資源簡介
第1篇 益智游戲第1章 連連看游戲第2章 黑白棋游戲第3章 漢諾塔游戲第4章 推箱子游戲第5章 掃雷游戲第6章 七巧板游戲第7章 21點撲克牌游戲第11章 坦克大戰游戲第12章 俄羅斯方塊等等
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Collections;
namespace?Parking
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?int[]?a;?????????????????//車位之間的通道信息
????????private?int[]?c?=?new?int[7];?????//車位中的車輛顏色代號
????????private?int[]?d?=?new?int[7];?????//車位中的初始時車輛顏色代號
????????private?int?order;????????????????//用戶當前玩的關號
????????private?int?Total?=?3;????????????//總關數
????????ArrayList??trace=new?ArrayList();
????????Point?p1?=?new?Point(68?275);
????????Point?p2?=?new?Point(68?125);
????????Point?p3?=?new?Point(218?35);
????????Point?p4?=?new?Point(368?125);
????????Point?p5?=?new?Point(368?275);
????????Point?p6?=?new?Point(218?355);
????????Point[]?p;
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????a?=?new?int[7?7];
????????????p?=?new?Point[7]?{?new?Point(0?0)?p1?p2?p3?p4?p5?p6?};
????????????order?=?1;???????????????????//當前是第一關
????????}
????????private?void?pBox_Click(object?sender?EventArgs?e)//事件處理方法
????????{
????????????PictureBox?pBox?=?(PictureBox)sender;
????????????int?j=Convert.ToInt16(pBox.Name.Substring(pBox.Name.Length?-?1?1));
????????????//計算所在車位
????????????int?n=0;
????????????for?(int?i?=?1;?i?<=?6;?i++)
????????????{
????????????????if?(c[i]?==?j)?n?=?i;
????????????}
????????????for?(int?m?=?1;?m?<=?6;?m++)
????????????{
????????????????if?(c[m]?==?0)//找出空車位m
????????????????{
????????????????????if?(a[m?n]?==?1?||?a[n?m]?==?1)//如果車位m?n之間有通道
????????????????????{
????????????????????????pBox.Location?=?p[m];//汽車移到空車位m
????????????????????????c[m]?=?c[n];?c[n]?=?0;
????????????????????}
????????????????????break;?
????????????????}
????????????}
????????????if?(success())
????????????{
????????????????order++;
????????????????//select_order(order);
????????????????MessageBox.Show(“成功了“?“恭喜“);
????????????????this.Text?=?“停車場游戲“;
????????????????this.Invalidate();?
????????????????button1_Click(sender?e);
????????????}
????????}
????????private?void?Draw_Road()//畫出車位之間通道
????????{
????????????Graphics?g?=?this.CreateGraphics();
????????????SolidBrush?b?=?new?SolidBrush(Color.BlanchedAlmond);
????????????for?(int?i?=?1;?i?<=?6;?i++)
????????????????for?(int?j?=?1;?j?<=?6;?j++)
????????????????{
????????????????????if?(a[i?j]?==?1)//第i和j停車位有通道
????????????????????{
????????????????????????g.DrawLine(new?Pen(Color.Blue?14)
????????????????????????????p[i].X?+?40?p[i].Y?+?15?p[j].X?+?40?p[j].Y?+?15);
????????????????????}
????????????????}
????????}
????????private?void?Draw_park()//畫出停車位
????????{
????????????Graphics?g?=?this.CreateGraphics();
????????????SolidBrush?b?=?new?SolidBrush(Color.BlanchedAlmond);
????????????Rectangle?r;
????????????r?=
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-01-13?10:34??c#游戲源碼\
?????目錄???????????0??2016-01-13?10:52??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\
?????目錄???????????0??2016-01-13?10:34??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\
?????目錄???????????0??2016-01-13?10:34??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\
?????目錄???????????0??2016-01-13?10:34??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\bin\
?????目錄???????????0??2016-01-13?10:34??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\bin\Debug\
?????文件???????22016??2011-07-03?16:19??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\bin\Debug\Parking.exe
?????文件???????40448??2011-07-03?16:19??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\bin\Debug\Parking.pdb
?????文件???????14328??2011-07-03?16:19??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\bin\Debug\Parking.vshost.exe
?????文件?????????490??2007-07-21?09:33??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\bin\Debug\Parking.vshost.exe.manifest
?????目錄???????????0??2016-01-13?10:34??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\car\
?????文件?????????818??2009-01-22?06:19??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\car\back.jpg
?????文件????????1270??2009-01-22?06:13??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\car\car1.jpg
?????文件????????1249??2009-01-22?06:15??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\car\car2.jpg
?????文件????????1358??2009-01-22?06:06??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\car\car3.jpg
?????文件????????1334??2009-01-22?06:16??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\car\car4.jpg
?????文件????????1217??2009-01-22?06:14??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\car\car5.jpg
?????文件???????12800??2009-01-22?06:24??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\car\Thumbs.db
?????文件????????9207??2011-07-03?16:19??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\Form1.cs
?????文件????????7889??2009-02-14?07:11??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\Form1.Designer.cs
?????文件???????16617??2009-02-14?07:11??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\Form1.resx
?????目錄???????????0??2016-01-13?10:34??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\
?????目錄???????????0??2016-01-13?10:34??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\Debug\
?????文件?????????772??2011-07-03?16:19??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\Debug\Parking.csproj.FileListAbsolute.txt
?????文件?????????847??2011-07-03?15:52??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\Debug\Parking.csproj.GenerateResource.Cache
?????文件???????22016??2011-07-03?16:19??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\Debug\Parking.exe
?????文件????????7842??2011-07-03?02:49??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\Debug\Parking.Form1.resources
?????文件???????40448??2011-07-03?16:19??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\Debug\Parking.pdb
?????文件?????????180??2011-07-03?02:49??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\Debug\Parking.Properties.Resources.resources
?????目錄???????????0??2016-01-13?10:34??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\Debug\TempPE\
?????文件????????4608??2011-07-03?02:49??c#游戲源碼\Visual?C#經典游戲編程開發?源代碼\第1篇?益智游戲\第10章?停車場游戲\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
............此處省略1347個文件信息
評論
共有 條評論