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

  • 大小: 2.49M
    文件類型: .rar
    金幣: 2
    下載: 1 次
    發布日期: 2020-12-26
  • 語言: C#
  • 標簽: 象棋??網絡??

資源簡介

程序使用VS2015,.NET4.5,.NET 2.0以上都可以編譯使用,無第三方組件,可生成32、64位。Socket網絡傳輸,可以對戰、多人旁觀,棋子棋盤圖片直接百度的。
象棋規則算法簡單,直接寫了,就100多行,燒腦的是對戰、旁觀視角問題,對戰雙方都是從下往上的視角,實際走棋看到對方位置應該是對角線,坐標轉換太特么燒腦,沒打草稿直接敲代碼,特么居然重寫了一遍才寫對。

為了圖像不閃爍,點擊棋子,將鼠標變為需要移動的棋子。
走棋規則基本全面,可直接對殺。
如有走棋規則錯誤修改:
//走棋規則 //當前位置atX、atY,放置位置setX、setY,棋子顏色 Qz_RB
public bool go_rules(string Qz, int atX, int atY, int setX, int setY, int Qz_RB)
都是坐標位置,很好改。
圖片文件在..\bin\Debug\Res里面

1、先啟動服務端 goServer.exe
服務端:
地址為IPAddress[] addrIP = Dns.GetHostAddresses("192.168.0.104"); //ip地址
根據你的需要進行修改;
進入服務端后點擊“開始監聽”。
2、打開客戶端 chess.exe
這里直接設置了進入到房間“0”,進入后顯示“等待其他人加入”,先進房的執紅旗,按鈕不可用;
當有第2個人進入后,執藍棋,按鈕顯示“準備”;
雙方都點擊“準備”后,進入對局;
后面再有人進入為旁觀者,能看見雙方對局信息。房間都是“0”。
地址:client = new TcpClient("192.168.0.104", 51888); //定義服務器端ip地址和端口,與服務器端定義要一致
根據你的需要進行修改;
3、跨線程在每個調用圖片函數開頭
4、時間有限,程序沒有做計算勝負,沒有做掉線處理。基本規則有了,其他的就是套接字變來變去,需要新功能自己添加。

象棋、圍棋做都完了,會下的棋都做了。
圍棋:http://www.haolizi.net/example/view_10794.html

只是一個初學練習,更多初學資料到我的博客http://www.cnblogs.com/qiaoke/


資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.IO;
using?System.Linq;
using?System.Net.Sockets;
using?System.Runtime.InteropServices;
using?System.Text;
using?System.Threading;
using?System.Threading.Tasks;
using?System.Windows.Forms;

namespace?chess
{
????public?partial?class?Form1?:?Form
????{
????????public?struct?IconInfo
????????{
????????????public?bool?fIcon;
????????????public?int?xHotspot;
????????????public?int?yHotspot;
????????????public?IntPtr?hbmMask;
????????????public?IntPtr?hbmColor;
????????}
????????[DllImport(“user32.dll“)]
????????public?static?extern?IntPtr?CreateIconIndirect(ref?IconInfo?icon);
????????[DllImport(“user32.dll“?SetLastError?=?true)]
??????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

????..A..H.?????49664??2017-03-25?11:21??chess2\chess\.vs\chess\v14\.suo

?????文件????????189??2017-03-22?09:42??chess2\chess\App.config

?????文件?????871936??2017-03-25?11:12??chess2\chess\bin\Debug\chess.exe

?????文件????????189??2017-03-22?09:42??chess2\chess\bin\Debug\chess.exe.config

?????文件??????40448??2017-03-25?11:12??chess2\chess\bin\Debug\chess.pdb

?????文件??????22696??2017-03-25?10:21??chess2\chess\bin\Debug\chess.vshost.exe

?????文件????????189??2017-03-22?09:42??chess2\chess\bin\Debug\chess.vshost.exe.config

?????文件????????490??2016-07-16?19:44??chess2\chess\bin\Debug\chess.vshost.exe.manifest

?????文件???????8800??2014-09-16?19:00??chess2\chess\bin\Debug\Res\b_0.png

?????文件???????8885??2014-09-16?19:00??chess2\chess\bin\Debug\Res\b_1.png

?????文件???????8853??2014-09-16?19:00??chess2\chess\bin\Debug\Res\b_2.png

?????文件???????8678??2014-09-16?19:00??chess2\chess\bin\Debug\Res\b_3.png

?????文件???????9083??2014-09-16?19:00??chess2\chess\bin\Debug\Res\b_4.png

?????文件???????8574??2014-09-16?19:00??chess2\chess\bin\Debug\Res\b_5.png

?????文件???????8861??2014-09-16?19:00??chess2\chess\bin\Debug\Res\b_6.png

?????文件??????15452??2017-03-19?16:01??chess2\chess\bin\Debug\Res\flag.png

?????文件?????635330??2017-03-18?08:47??chess2\chess\bin\Debug\Res\QiPan.png

?????文件???????8507??2014-09-16?19:00??chess2\chess\bin\Debug\Res\R_0.png

?????文件???????8592??2014-09-16?19:00??chess2\chess\bin\Debug\Res\R_1.png

?????文件???????8792??2014-09-16?19:00??chess2\chess\bin\Debug\Res\R_2.png

?????文件???????8552??2014-09-16?19:00??chess2\chess\bin\Debug\Res\R_3.png

?????文件???????8846??2014-09-16?19:00??chess2\chess\bin\Debug\Res\R_4.png

?????文件???????8940??2014-09-16?19:00??chess2\chess\bin\Debug\Res\R_5.png

?????文件???????8952??2014-09-16?19:00??chess2\chess\bin\Debug\Res\R_6.png

?????文件???????3946??2017-03-22?12:56??chess2\chess\chess.csproj

?????文件????????976??2017-03-22?09:42??chess2\chess\chess.sln

?????文件??????36019??2017-03-25?11:12??chess2\chess\Form1.cs

?????文件???????5306??2017-03-25?11:12??chess2\chess\Form1.Designer.cs

?????文件????1276664??2017-03-25?11:12??chess2\chess\Form1.resx

?????文件????????619??2017-03-22?12:55??chess2\chess\goChess.cs

............此處省略49個文件信息

評論

共有 條評論