91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

本項目為我的C#作業,完整的中國象棋游戲,單機版,優質的畫面,清晰完整代碼注釋,真實完整,非常有趣,下載了絕不后悔!!!

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;

//添加命名空間
using?System.IO;
using?System.Media;
using?System.Diagnostics;

namespace?Chess
{
????//棋子枚舉類型
????public?enum?Piece
????{
????????無子?=?0
????????紅車?=?1?紅馬?=?2?紅相?=?3?紅士?=?4?紅帥?=?5?紅炮?=?6?紅卒?=?7
????????藍車?=?8?藍馬?=?9?藍象?=?10?藍士?=?11?藍將?=?12?藍炮?=?13?藍兵?=?14
????}

????//走棋方枚舉類型
????public?enum?Player
????{
????????無?=?0?紅?=?1?藍?=?2
????}
????
????//主窗口類
????public?partial?class?FormMain?:?Form
????{
????????//保存象棋棋盤的所有棋子值(棋盤共10行9列)
????????private?Piece[]?_chess?=?new?Piece[10?9];

????????//保存所有的走棋步驟(List對象)
????????private?List?_stepList?=?new?List();

????????//保存棋盤(細框)的左上角坐標
????????private?Point?_leftTop?=?new?Point(60?60);

????????//保存棋盤格子的行高和列寬
????????private?int?_rowHeight?=?60;
????????private?int?_colWidth?=?60;

????????//保存棋子半徑
????????private?int?_pieceR?=?29;

????????//保存拾起的棋子值(默認為“無子“,即目前沒有拾起棋子)
????????private?Piece?_pickChess?=?Piece.無子;
????????//保存拾起棋子的行號和列號
????????private?int?_pickRow?=?0;
????????private?int?_pickCol?=?0;

????????//保存落下棋子的行號和列號
????????private?int?_dropRow?=?0;
????????private?int?_dropCol?=?0;

????????//保存當前鼠標所在點坐標
????????private?Point?_curMousePoint?=?new?Point(0?0);

????????//保存棋盤桌面位圖
????????private?Bitmap?_deskBmp?=?new?Bitmap(“desktop.jpg“);

????????//保存紅藍雙方14種棋子位圖(為了與Piece枚舉類型值對應,_pieceBmp[0]舍棄不用)
????????private?Bitmap[]?_pieceBmp?=?new?Bitmap[15];

????????//保存紅方頭像位圖
????????private?Bitmap?_redBmp?=?new?Bitmap(“紅方頭像.bmp“);
????????//保存藍方頭像位圖
????????private?Bitmap?_blueBmp?=?new?Bitmap(“藍方頭像.bmp“);

????????//保存當前的走棋方
????????private?Player?_curPlayer?=?Player.無;

????????//保存項目“.exe“文件的所在路徑
????????private?string?_exePath;

????????//自定義類方法:繪制棋盤
????????public?void?DrawBoard(Graphics?g)
????????{
????????????//繪制棋盤桌面
????????????g.DrawImage(_deskBmp?new?Point(0?0));

????????????//創建粗畫筆和細畫筆
????????????Pen?thickPen?=?new?Pen(Color.Black?6);
????????????Pen?thinPen?=?new?Pen(Color.Black?2);
????????????
????????????//繪制棋盤外圍的粗框
????????????int?gap?=?(int)(_rowHeight*0.15);
????????????g.DrawRectangle(thickPen?new?Rectangle(_leftTop.X?-?gap?_leftTop.Y?-?gap?_colWidth?*?8?+?2?*?gap?_rowHeight?*?9?+?2?*?gap));

????????????//繪制棋盤的10條橫線(10行)
????????????for?(int?row?=?1;?row?<=?10;?row++)
????????????{
????????????????g.DrawLine(thinPen?new?Point(_leftTop.X?_leftTop.Y?+?_rowHeight?*?(row?-?1))
????????????????????????????????????new?Point(_leftTop.X?+?8?*?_colWidth?_leftTop.Y?+?_rowHeight?*?(row?-?1)));
????????????}

????????????//繪制棋盤的9條豎線(9列)
????????????for?(int?col?=?1;?col?<=?9;?col++)
????????????{
????????????????//繪制棋盤上半部分的豎線
????????????????g.DrawLine(thinPen?new?Point(_leftTop.X?+?(col?-?1)?*?_colWidth?_leftTop.Y)
?????????????????????????????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????905??2017-04-10?10:29??Chess.sln
?????文件???????26624??2018-04-25?23:01??Chess.suo
?????目錄???????????0??2018-07-17?00:26??Chess\
?????目錄???????????0??2018-07-17?00:26??Chess\bin\
?????目錄???????????0??2018-07-17?00:26??Chess\bin\Debug\
?????文件???????29184??2017-04-24?13:43??Chess\bin\Debug\Chess.exe
?????文件???????73216??2017-04-24?13:43??Chess\bin\Debug\Chess.pdb
?????文件???????14328??2018-04-25?22:54??Chess\bin\Debug\Chess.vshost.exe
?????文件?????????490??2009-06-11?05:14??Chess\bin\Debug\Chess.vshost.exe.manifest
?????文件???????63289??2011-02-22?21:37??Chess\bin\Debug\desktop.jpg
?????目錄???????????0??2018-07-17?00:26??Chess\bin\Debug\Sounds\
?????文件??????127076??2010-07-30?11:01??Chess\bin\Debug\Sounds\begin.wav
?????文件????????3362??2010-07-30?11:01??Chess\bin\Debug\Sounds\drop.wav
?????文件???????16992??2010-07-30?11:01??Chess\bin\Debug\Sounds\eat.wav
?????文件???????43402??2010-07-30?11:01??Chess\bin\Debug\Sounds\over.wav
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\紅兵.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\紅士.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\紅帥.bmp
?????文件????????5046??1999-11-04?14:46??Chess\bin\Debug\紅方頭像.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\紅炮.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\紅相.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\紅車.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\紅馬.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\藍兵.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\藍士.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\藍帥.bmp
?????文件????????5046??1999-11-04?14:43??Chess\bin\Debug\藍方頭像.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\藍炮.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\藍象.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\藍車.bmp
?????文件????????4560??2007-12-28?09:52??Chess\bin\Debug\藍馬.bmp
............此處省略23個文件信息

評論

共有 條評論