c#拼图游戏源码

时间:2017-04-08 09:58:18
【文件属性】:
文件名称:c#拼图游戏源码
文件大小:2.05MB
文件格式:RAR
更新时间:2017-04-08 09:58:18
c# 游戏 源码 拼图游戏源码,部分代码: private void InitializeLocations() { List allLocations = new List(); allLocations.Clear(); int getRandNumber = rand.Next(1, 17); allLocations.Add(getRandNumber); spaceLocation = getRandNumber;//设置空白位置 for (int i = 1; i < 16; i++) { while (true) { getRandNumber = rand.Next(1, 17); if ((getRandNumber != spaceLocation) && !(allLocations.Contains(getRandNumber))) { break; } } ControlLocation cl = new ControlLocation(); cl.LableNum = i; cl.LocationNum = getRandNumber;//5~1|a|s|p|x clList.Add(cl); allLocations.Add(getRandNumber); } //循环设置每一个lable位置 foreach (ControlLocation cl in clList) { int lableNumber = cl.LableNum; int locationNumber = cl.LocationNum; string getLocation = locations[locationNumber]; string[] locationArray = getLocation.Split(','); Label lable = (Label)this.Controls["label" + lableNumber.ToString()]; lable.Location = new System.Drawing.Point(int.Parse(locationArray[0]), int.Parse(locationArray[1])); } Invalidate(); } private int SelectLocationNumber(int lableNumber) { int result = 0; foreach (ControlLocation cl in clList) { if (cl.LableNum == lableNumber) { result=cl.LocationNum; } } return result; }
【文件预览】:
bin
----Debug()
--------GamePicture.pdb(64KB)
--------GamePicture.vshost.exe.manifest(490B)
--------GamePicture.exe(569KB)
--------GamePicture.vshost.exe(14KB)
Form1.Designer.cs
GamePicture.suo
Images
----Dog1()
--------123_10.gif(9KB)
--------123_04.gif(9KB)
--------123_07.gif(11KB)
--------123_11.gif(10KB)
--------123_06.gif(12KB)
--------123_16.gif(11KB)
--------123_12.gif(11KB)
--------123_03.gif(10KB)
--------123_09.gif(7KB)
--------123_08.gif(11KB)
--------123_13.gif(8KB)
--------Full.jpg(47KB)
--------123_15.gif(10KB)
--------123_05.gif(9KB)
--------123_01.gif(8KB)
--------123_14.gif(9KB)
--------123_02.gif(10KB)
----windows98()
--------789_14.gif(9KB)
--------789_10.gif(9KB)
--------789_16.gif(9KB)
--------789_06.gif(9KB)
--------789_03.gif(8KB)
--------789_12.gif(8KB)
--------789_15.gif(9KB)
--------789_02.gif(8KB)
--------789_01.gif(8KB)
--------full3.jpg(26KB)
--------789_07.gif(8KB)
--------789_08.gif(8KB)
--------789_05.gif(8KB)
--------789_13.gif(8KB)
--------789_11.gif(8KB)
--------789_09.gif(8KB)
--------789_04.gif(8KB)
----Girl1()
--------456_05.gif(4KB)
--------456_14.gif(5KB)
--------456_13.gif(4KB)
--------456_07.gif(6KB)
--------456_01.gif(2KB)
--------456_08.gif(4KB)
--------456_09.gif(3KB)
--------456_03.gif(4KB)
--------456_06.gif(6KB)
--------456_11.gif(5KB)
--------456_15.gif(7KB)
--------456_10.gif(5KB)
--------456_16.gif(5KB)
--------456_12.gif(3KB)
--------456_04.gif(3KB)
--------Full2.jpg(102KB)
--------456_02.gif(4KB)
GamePicture.csproj
Program.cs
obj
----Debug()
--------GamePicture.csproj.FileListAbsolute.txt(1KB)
--------GamePicture.pdb(64KB)
--------TempPE()
--------GamePicture.Form1.resources(180B)
--------Refactor()
--------GamePicture.csproj.GenerateResource.Cache(3KB)
--------GamePicture.exe(569KB)
--------GamePicture.Properties.Resources.resources(542KB)
from.gif
Form1.cs
Form1.resx
ControlLocation.cs
Properties
----Resources.resx(18KB)
----Settings.settings(249B)
----AssemblyInfo.cs(1KB)
----Settings.Designer.cs(1KB)
----Resources.Designer.cs(15KB)
GamePicture.sln

网友评论