九九热最新网址,777奇米四色米奇影院在线播放,国产精品18久久久久久久久久,中文有码视频,亚洲一区在线免费观看,国产91精品在线,婷婷丁香六月天

歡迎來到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁 裝配圖網(wǎng) > 資源分類 > DOC文檔下載  

C++俄羅斯方塊程序設(shè)計詳細(xì)說明

  • 資源ID:26954344       資源大小:169KB        全文頁數(shù):34頁
  • 資源格式: DOC        下載積分:15積分
快捷下載 游客一鍵下載
會員登錄下載
微信登錄下載
三方登錄下載: 微信開放平臺登錄 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要15積分
郵箱/手機:
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機號,方便查詢和重復(fù)下載(系統(tǒng)自動生成)
支付方式: 支付寶    微信支付   
驗證碼:   換一換

 
賬號:
密碼:
驗證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會被瀏覽器默認(rèn)打開,此種情況可以點擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預(yù)覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標(biāo)題沒有明確說明有答案則都視為沒有答案,請知曉。

C++俄羅斯方塊程序設(shè)計詳細(xì)說明

該實驗制作的是小游戲-俄羅斯方塊1.可實現(xiàn)以下基本功能:用戶可自定義添加或刪除方塊樣式及顏色;用戶可自定義修改游戲背景顏色及按鍵設(shè)置。2.另增加了幾個功能:按鍵設(shè)置改變后點擊保存,會彈出對話框提示“保存成功” ;點擊“開始”運行游戲,背景音樂自動播放,點擊暫停后,背景音樂也隨之停止;每消除一行,會有特效聲音提示消除成功;根據(jù)消行多少會自動加分并顯示。游戲界面效果圖如下:配置窗體效果圖如下:磚塊樣式配置效果圖如下:游戲設(shè)計分為如下九個部分:一, 新建窗體“配置窗體”(TrmConfig)添加TabControl控件(1) 磚塊樣式配置I.abel控件(lblMode)點擊“事件”,選擇“Paint”Graphics gp=e.Graphics;gp.Clear(Color.Black);Pen p=new Pen(Color.White);for (int i=31;i<155;i=i+31)gp.DrawLine(p,1,i,155,i);for (int i=31;i<155;i=i+31)gp.DrawLine(p,i,1,i,155);SolidBrush s=new SolidBrush(blockColor);for (int x=0;x<5;x+)for(int y=0;y<5;y+)if(struArrx,y)gp.FillRectangle(s,31*x+1,31*y+1,30,30);點擊“事件”,選擇“MouseClick”private bool, struArr=new bool5,5;private Color blockColor=Color.Red;-if (e.Button!=MouseButtons.Left)return;int xPos,yPos;xPos=e.X/31;yPos=e.Y/31;struArrxPos,yPos=!struArrxPos,yPos;bool b=struArrxPos,yPos;Graphics gp=lblMode.CreateGraphics();SolidBrush s=new SolidBrush(b ? blockColor:Color.Black);gp.FillRectangle(s,31*xPos+1,31*yPos+1,30,30);gp.Dispose();II.添加ColorDialog控件添加label(lblColor)控件點擊“事件”,選擇“click”colorDialog1.ShowDialog();blockColor=colorDialog1.Color;lblColor.BackColor=colorDialog1.Color;lblMode.Invalidate();III.添加listView控件(lsvBlockSet)點擊“事件”,選擇“ItemSelectionChanged”if (e.IsSelected)blockColor=Color.FromArgb(int.Parse(e.Item.SubItems1.Text);lblColor.BackColor=blockColor;string s=e.Item.SubItems0.Text;for(int i=0;i<s.Length;i+)struArri/5,i%5=(si=1)?true:false;lblMode.Invalidate();IV.“添加”按鈕(btnAdd)bool isEmpty=false;foreach (bool i in struArr)if(i)isEmpty=true;break;if (!isEmpty)MessageBox.Show("圖案為空,請先用鼠標(biāo)點擊左邊窗口繪制圖案!","提示窗口",MessageBoxButtons.OK,MessageBoxIcon.Information);return;StringBuilder sb=new StringBuilder(25);foreach (bool i in struArr)sb.Append(i?"1":"0");string blockString=sb.ToString();foreach(ListViewItem item in lsvBlockSet.Items)if (item.SubItems0.Text=blockString)MessageBox.Show("該圖案已經(jīng)存在!","提示窗口",MessageBoxButtons.OK,MessageBoxIcon.Information);return;ListViewItem myItem=new ListViewItem();myItem=lsvBlockSet.Items.Add(blockString);myItem.SubItems.Add(Convert.ToString(blockColor.ToArgb();V.“刪除”按鈕(btnDel)if(lsvBlockSet.SelectedItems.Count=0)MessageBox.Show("請在右邊窗口選擇一個條目進行刪除!","提示窗口",MessageBoxButtons.OK,MessageBoxIcon.Information);return;lsvBlockSet.Items.Remove(lsvBlockSet.SelectedItems0);btnClear.PerformClick();VI.“清空”(btnClear)for (int x=0;x<5;x+)for(int y=0;y<5;y+)struArrx,y=false;lblMode.Invalidate();VII.“修改”(btnUpdate)if(lsvBlockSet.SelectedItems.Count=0)MessageBox.Show("請在右邊窗口選擇一個條目進行修改!","提示窗口",MessageBoxButtons.OK,MessageBoxIcon.Information);return;bool isEmpty=false;foreach (bool i in struArr)if(i)isEmpty=true;break;if (!isEmpty)MessageBox.Show("圖案為空,請先用鼠標(biāo)點擊左邊窗口繪制圖案再進行修改!","提示窗口",MessageBoxButtons.OK,MessageBoxIcon.Information);return;StringBuilder sb=new StringBuilder(25);foreach (bool i in struArr)sb.Append(i?"1":"0");lsvBlockSet.SelectedItems0.SubItems0.Text=sb.ToString();lsvBlockSet.SelectedItems0.SubItems1.Text=Convert.ToString(blockColor.ToArgb();(2) 參數(shù)配置I.添加GroupBox1控件(gbKeySet)“鍵盤設(shè)置”i.拖入六個label控件ii.拖入六個TextBox控件(改名) 全部選中,選擇“事件”,選擇“KeyDown”if(e.KeyValue>=33 && e.KeyValue<=36)|(e.KeyValue>=45 && e.KeyValue<=46)|(e.KeyValue>=48 && e.KeyValue<=57)|(e.KeyValue>=65 && e.KeyValue<=90)|(e.KeyValue>=96 && e.KeyValue<=107)|(e.KeyValue>=109 && e.KeyValue<=111)|(e.KeyValue>=186 && e.KeyValue<=192)|(e.KeyValue>=219 && e.KeyValue<=222)foreach(Control c in gbKeySet.Controls)Control TempC=c as TextBox;if(TempC!=null &&(TextBox)TempC).Text!="")if(int)(TextBox)TempC).Tag)=e.KeyValue)(TextBox)TempC).Text=""(TextBox)TempC).Tag=Keys.None;(TextBox)sender).Text=e.KeyCode.ToString();(TextBox)sender).Tag=(Keys)e.KeyValue;II.添加GroupBox2控件(gbEnvironmentSet)“環(huán)境設(shè)置”i.拖入四個label控件ii.拖入三個TextBox控件(改名) 一個label控件(lblBackColor)選擇“事件”,選擇“click”colorDialog1.ShowDialog();lblBackColor.BackColor=colorDialog1.Color;III.i.參數(shù)初始化設(shè)置為配置窗體的代碼窗口添加私有成員變量private Config config=new Config();初始化config.LoadFromXmlFile();InfoArr info = config.Info;ListViewItem myItem=new ListViewItem();for(int i=0;i<info.Length;i+)myItem=lsvBlockSet.Items.Add(infoi.GetIdStr();myItem.SubItems.Add(infoi.GetColorStr();讀快捷鍵及環(huán)境設(shè)置參數(shù)txtDown.Text=(Keys)config.DownKey).ToString();txtDown.Tag=config.DownKey;txtDrop.Text=(Keys)config.DropKey).ToString();txtDrop.Tag=config.DropKey;txtLeft.Text=(Keys)config.MoveLeftKey).ToString();txtLeft.Tag=config.MoveLeftKey;txtRight.Text=(Keys)config.MoveRightKey).ToString();txtRight.Tag=config.MoveRightKey;txtDeasil.Text=(Keys)config.DeasilRotateKey).ToString();txtDeasil.Tag=config.DeasilRotateKey;txtContra.Text=(Keys)config.ContraRotateKey).ToString();txtContra.Tag=config.ContraRotateKey;txtCoorWidth.Text=config.CoorWidth.ToString();txtCoorHeight.Text=config.CoorHeight.ToString();txtRectPix.Text=config.RectPix.ToString();lblBackColor.BackColor=config.BackColor;ii.保存更改選擇“事件”,選擇“click”保存用戶更改的設(shè)置InfoArr info=new InfoArr();foreach(ListViewItem item in lsvBlockSet.Items)info.Add(item.SubItems0.Text,item.SubItems1.Text);config.Info=info;config.DownKey=(Keys)txtDown.Tag;config.DropKey=(Keys)txtDrop.Tag;config.MoveLeftKey=(Keys)txtLeft.Tag;config.MoveRightKey=(Keys)txtRight.Tag;config.DeasilRotateKey=(Keys)txtDeasil.Tag;config.ContraRotateKey=(Keys)txtContra.Tag;config.CoorWidth=int.Parse(txtCoorWidth.Text);config.CoorHeight=int.Parse(txtCoorHeight.Text);config.RectPix=int.Parse(txtRectPix.Text);config.BackColor=lblBackColor.BackColor;config.SaveToXmlFile();二, 信息保存解決方案中添加BlockSet.Xml文件<BlockSet> <Type> <ID>0000001100011000000000000</ID> <Color>-65536</Color> </Type> <Type> <ID>0000000000111100000000000</ID> <Color>-16711936</Color> </Type> <Tppe> <ID>0000000000001100010000100</ID> <Color>-8323073</Color> </Tppe> <Type> <ID>0010000100001100000000000</ID> <Color>-16776961</Color> </Type> <Type> <ID>0000000100001100010000000</ID> <Color>-32704</Color> </Type> <Type> <ID>0000000100001100001000000</ID> <Color>-32513</Color> </Type> <Type> <ID>0000000010001100010000000</ID> <Color>-8372160</Color> </Type> <Key> <DownKey>83</DownKey> <DropKey>88</DropKey> <MoveLeftKey>65</MoveLeftKey> <MoveRightKey>68</MoveRightKey> <DeasilRotateKey>99</DeasilRotateKey> <ContraRotateKey>97</ContraRotateKey> </Key> <Surface> <CoorWidth>15</CoorWidth> <CoorHeight>25</CoorHeight> <RectPix>20</RectPix> <BackColor>-16777216</BackColor> </Surface> </BlockSet>三, 一個磚塊的信息類解決方案中添加BlockInfo.cs類private BitArray _id;private Color _bColor;public BlockInfo(BitArray id,Color bColor)_id=id;_bColor=bColor;public BitArray IDgetreturn _id;set_id=value;public Color BColorgetreturn _bColor;set_bColor=value;public string GetIdStr()StringBuilder s=new StringBuilder(25);foreach(bool b in _id)s.Append(b?"1":"0");return s.ToString();public string GetColorStr()return Convert.ToString(_bColor.ToArgb();由于使用到了Color類,要添加命名空間using Syetem.Drawing;由于使用了StringBuilder類以及BitArray類using System.Collections.Generic;->using System.Collections;四, 多個磚塊信息類解決方案中添加InfoArr.cs類I .各個方塊信息類private ArrayList info = new ArrayList();private int _length=0;public int Lengthgetreturn _length;public BlockInfo thisint indexgetreturn (BlockInfo)infoindex;public string thisstring idsetif(value ="")return;for(int i=0;i<info.Count;i+)if(BlockInfo)infoi).GetIdStr()=id)try(BlockInfo)infoi).BColor=Color.FromArgb(Convert.ToInt32(value);catch(System.FormatException)MessageBox.Show("顏色信息錯誤!請刪除BlockSet.xml文件,并重新啟動程序","錯誤信息",MessageBoxButtons.OK,MessageBoxIcon.Error);/由于使用到了ArrayList,要添加命名空間using System.Collections.Generic;->using System.Collections;/由于使用到了MessageBox,要添加命名空間using System.Windows.Forms;由于使用到了Color類,還要添加using Syetem.Drawing;II.添加字符轉(zhuǎn)換成員方法private BitArray StrToBit(string id)if(id.Length !=25)throw new System.FormatException("磚塊樣式信息不合法!請刪除BlockSet.xml文件,并重新啟動程序");BitArray ba =new BitArray(25);for(int i=0;i<25;i+)bai=(idi=0)?false:true;return ba;III添加磚塊信息成員方法public void Add(BitArray id,Color bColor)if(id.Length !=25)throw new System.FormatException("磚塊樣式信息不合法!請刪除BlockSet.xml文件,并重新啟動程序");info.Add(new BlockInfo(id,bColor);_length+;IV.對上面方法重載public void Add(string id,string bColor)Color temp;if(!(bColor="")temp=Color.FromArgb(Convert.ToInt32(bColor);elsetemp=Color.Empty;info.Add(new BlockInfo(StrToBit(id),temp);_length+;五, 新建配置類解決方案中添加 Config.cs類private Keys _downKey;private Keys _dropKey;private Keys _moveLeftKey;private Keys _moveRightKey;private Keys _deasilRotateKey;private Keys _contraRotateKey;private int _coorWidth;private int _coorHeight;private int _rectPix;private Color _backColor;private InfoArr info=new InfoArr();I.私有變量屬性#region 私有變量相應(yīng)的屬性public Keys DownKeygetreturn _downKey;set_downKey=value;public Keys DropKeygetreturn _dropKey;set_dropKey=value;public Keys MoveLeftKeygetreturn _moveLeftKey;set_moveLeftKey=value;public Keys MoveRightKeygetreturn _moveRightKey;set_moveRightKey=value;public Keys DeasilRotateKeygetreturn _deasilRotateKey;set_deasilRotateKey=value;public Keys ContraRotateKeygetreturn _contraRotateKey;set_contraRotateKey=value;public int CoorWidthgetreturn _coorWidth;setif(value>=10&&value<=50)_coorWidth=value;public int CoorHeightgetreturn _coorHeight;setif(value>=15&&value<=50)_coorHeight=value;public int RectPixgetreturn _rectPix;setif(value>=10&&value<=30)_rectPix=value;public Color BackColorgetreturn _backColor;set_backColor=value;public InfoArr Infogetreturn info;setinfo=value;#endregionII.從xml讀取信息public void LoadFromXmlFile()/從xml讀取信息XmlTextReader reader;if (File.Exists("BlockSet.xml")reader=new XmlTextReader("BlockSet.xml");elseAssembly asm=Assembly.GetExecutingAssembly();Stream sm=asm.GetManifestResourceStream("Tetris.BlockSet.xml");reader=new XmlTextReader(sm);string key=""trywhile(reader.Read()if(reader.NodeType =XmlNodeType.Element)if(reader.Name ="ID")key=reader.ReadElementString().Trim();info.Add(key,"");else if (reader.Name ="Color")infokey=reader.ReadElementString().Trim();else if (reader.Name ="DownKey")_downKey=(Keys)Convert.ToInt32(reader.ReadElementString().Trim();else if (reader.Name ="DropKey")_dropKey=(Keys)Convert.ToInt32(reader.ReadElementString().Trim();else if (reader.Name ="MoveLeftKey")_moveLeftKey=(Keys)Convert.ToInt32(reader.ReadElementString().Trim();else if (reader.Name ="MoveRightKey")_moveRightKey=(Keys)Convert.ToInt32(reader.ReadElementString().Trim();else if (reader.Name ="DeasilRotateKey")_deasilRotateKey=(Keys)Convert.ToInt32(reader.ReadElementString().Trim();else if (reader.Name ="ContraRotateKey")_contraRotateKey=(Keys)Convert.ToInt32(reader.ReadElementString().Trim();else if (reader.Name ="CoorWidth")_coorWidth=Convert.ToInt32(reader.ReadElementString().Trim();else if (reader.Name ="CoorHeight")_coorHeight=Convert.ToInt32(reader.ReadElementString().Trim();else if (reader.Name ="RectPix")_rectPix=Convert.ToInt32(reader.ReadElementString().Trim();else if (reader.Name ="BackColor")_backColor=Color.FromArgb(Convert.ToInt32(reader.ReadElementString().Trim();catch(Exception ex)MessageBox.Show(ex.ToString();finallyif(reader !=null)reader.Close();III.把信息保存為xml文件public void SaveToXmlFile() /把信息保存為xml文件XmlDocument doc =new XmlDocument();doc.LoadXml("<BlockSet></BlockSet>");XmlNode root=doc.SelectSingleNode("BlockSet");for(int i=0;i<info.Length;i+)XmlElement xelType=doc.CreateElement("Type");XmlElement xelID=doc.CreateElement("ID");xelID.InnerText=(BlockInfo)infoi).GetIdStr();xelType.AppendChild(xelID);XmlElement xelColor=doc.CreateElement("Color");xelColor.InnerText=(BlockInfo)infoi).GetColorStr();xelType.AppendChild(xelColor);root.AppendChild(xelType);/寫快捷鍵XmlElement xelKey=doc.CreateElement("Key");XmlElement xelDownKey=doc.CreateElement("DownKey");xelDownKey.InnerText=Convert.ToInt32(_downKey).ToString();xelKey.AppendChild(xelDownKey);XmlElement xelDropKey=doc.CreateElement("DropKey");xelDropKey.InnerText=Convert.ToInt32(_dropKey).ToString();xelKey.AppendChild(xelDropKey);XmlElement xelMoveLeftKey=doc.CreateElement("MoveLeftKey");xelMoveLeftKey.InnerText=Convert.ToInt32(_moveLeftKey).ToString();xelKey.AppendChild(xelMoveLeftKey);XmlElement xelMoveRightKey=doc.CreateElement("MoveRightKey");xelMoveRightKey.InnerText=Convert.ToInt32(_moveRightKey).ToString();xelKey.AppendChild(xelMoveRightKey);XmlElement xelDeasilRotateKey=doc.CreateElement("DeasilRotateKey");xelDeasilRotateKey.InnerText=Convert.ToInt32(_deasilRotateKey).ToString();xelKey.AppendChild(xelDeasilRotateKey);XmlElement xelContraRotateKey=doc.CreateElement("ContraRotateKey");xelContraRotateKey.InnerText=Convert.ToInt32(_contraRotateKey).ToString();xelKey.AppendChild(xelContraRotateKey);root.AppendChild(xelKey);/寫界面信息XmlElement xelSurface=doc.CreateElement("Surface");XmlElement xelCoorWidth=doc.CreateElement("CoorWidth");xelCoorWidth.InnerText= _coorWidth.ToString();xelSurface.AppendChild(xelCoorWidth);XmlElement xelCoorHeight=doc.CreateElement("CoorHeight");xelCoorHeight.InnerText= _coorHeight.ToString();xelSurface.AppendChild(xelCoorHeight);XmlElement xelRectPix=doc.CreateElement("RectPix");xelRectPix.InnerText= _rectPix.ToString();xelSurface.AppendChild(xelRectPix);XmlElement xelBackColor=doc.CreateElement("BackColor");xelBackColor.InnerText=_backColor.ToArgb().ToString();xelSurface.AppendChild(xelBackColor);root.AppendChild(xelSurface);doc.Save("BlockSet.xml");六, 新建方塊類解決方案中添加Block.cs類protected Point structArr;protected int _xPos;protected int _yPos;protected Color _blockColor;protected Color disapperColor;protected int rectPix;public Block()public Block(Point sa, Color bColor, Color dColor, int pix)_blockColor=bColor;disapperColor=dColor;rectPix=pix;structArr=sa;public Point thisint indexgetreturn structArrindex;public int Lengthgetreturn structArr.Length;#region 成員變量相應(yīng)的屬性public int XPosgetreturn _xPos;set_xPos=value;public int YPosgetreturn _yPos;set_yPos=value;public Color BlockColorgetreturn _blockColor;#endregion-public void DeasilRotate()/順時針旋轉(zhuǎn)int temp;for(int i=0;i<structArr.Length;i+)temp=structArri.X;structArri.X=structArri.Y;structArri.Y=-temp;public void ContraRotate()/逆時針旋轉(zhuǎn)int temp;for(int i=0;i<structArr.Length;i+)temp=structArri.X;structArri.X=-structArri.Y;structArri.Y=temp;private Rectangle PointToRect(Point p)/坐標(biāo)點轉(zhuǎn)化為畫布坐標(biāo)值return new Rectangle(_xPos + p.X)*rectPix+1,(_yPos-p.Y)*rectPix+1,rectPix-2,rectPix-2);public virtual void Paint(Graphics gp)/制定畫板下繪制磚塊SolidBrush sb=new SolidBrush(_blockColor);foreach(Point p in structArr)lock(gp)gp.FillRectangle(sb,PointToRect(p);public void erase(Graphics gp)/擦除矩形SolidBrush sb=new SolidBrush(disapperColor);foreach(Point p in structArr)lock(gp)gp.FillRectangle(sb,PointToRect(p);七, 新建生產(chǎn)磚塊的類解決方案中添加BlockGroup.cs類private InfoArr info;private Color disapperColor;private int rectPix;public BlockGroup()Config config=new Config();config.LoadFromXmlFile();info=new InfoArr();info=config.Info;disapperColor=config.BackColor;rectPix=config.RectPix;public Block GetABlock()Random rd=new Random();int keyOrder=rd.Next(0,info.Length);BitAarry ba=infokeyOrder.ID;int struNum=0;foreach(bool b in ba)if(b)struNum+;Point structArr=new PointstruNum;int k=0;for(int j=0;j<ba.Length;j+)if(baj)structArrk.X=j/5-2;structArrk.Y=2-j%5;k+;return new Block(structArr,infokeyOrder.BColor,disapperColor,rectPix);八, 新建為磚塊活動定規(guī)則的類在解決方案中添加Palette.cs類private int _width=15;private int _height=25;private Color, coorArr;private Color disapperColor;private Graphics gpPalette;private Graphics gpReady;private BlockGroup bGroup;private Block runBlock;private Block readyBlock;private int rectPix;private System.Timers.Timer timerBlock;private int timeSpan=800;public Palette(int x,int y,int pix,Color dColor,Graphics gp,Graphics gr)_width=x;_height=y;coorArr=new Color_width,_height;disapperColor=dColor;gpPalette=gp;gpReady=gr;rectPix=pix;public void Start()bGroup=new BlockGroup();runBlock=bGroup.GetABlock();runBlock.XPos=_width/2;int y=0;for(int i=0;i<runBlock.Length;i+)if(runBlocki.Y>y)y=runBlocki.Y;runBlock.YPos=y; gpPalette.Clear(disapperColor);/清空畫板runBlock.Paint(gpPalette); Thread.Sleep(20);readyBlock=bGroup.GetABlock();readyBlock.XPos=2;readyBlock.YPos=2;gpReady.Clear(disapperColor);/清空畫板readyBlock.Paint(gpReady);timerBlock=new System.Timers.Timer(timeSpan);timerBlock.Elapsed +=new System.Timers.ElapsedEventHandler(OnTimedEvent);timerBlock.AutoReset=true;timerBlock.Start();private void OnTimedEvent(object source,ElapsedEventArgs e)CheckAndOverBlock();Down();public bool Down()int xPos=runBlock.XPos;int yPos=runBlock.YPos+1;for(int i=0;i<runBlock.Length;i+)if(yPos-runBlocki.Y>_height-1)return false;if(!coorArrxPos+runBlocki.X,yPos-runBlocki.Y.IsEmpty)return false;runBlock.erase(gpPalette);runBlock.YPos+;runBlock.Paint(gpPalette);return true;public void Drop()timerBlock.Stop();while(Down();timerBlock.Start();public void MoveLeft()int xPos=runBlock.XPos-1;int yPos=runBlock.YPos;for(int i=0;i<runBlock.Length;i+)if(xPos+runBlocki.X<0)return;if(!coorArrxPos+runBlocki.X,yPos-runBlocki.Y.IsEmpty)return;runBlock.erase(gpPalette);runBlock.XPos-;runBlock.Paint(gpPalette); public void MoveRight()int xPos=runBlock.XPos+1;int yPos=runBlock.YPos;for(int i=0;i<runBlock.Length;i+)if(xPos+runBlocki.X>_width-1)return;if(!coorArrxPos+runBlocki.X,yPos-runBlocki.Y.IsEmpty)return;runBlock.erase(gpPalette);runBlock.XPos+;runBlock.Paint(gpPalette); public void DeasilRotate()for(int i=0;i<runBlock.Length;i+)int x=run

注意事項

本文(C++俄羅斯方塊程序設(shè)計詳細(xì)說明)為本站會員(仙***)主動上傳,裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng)(點擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因為網(wǎng)速或其他原因下載失敗請重新下載,重復(fù)下載不扣分。




關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!