软著申请源代码

软著申请源代码

ID:40147438

大小:45.44 KB

页数:90页

时间:2019-07-23

软著申请源代码_第1页
软著申请源代码_第2页
软著申请源代码_第3页
软著申请源代码_第4页
软著申请源代码_第5页
资源描述:

《软著申请源代码》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、弈秋围棋游戏软件V1.0源代码90前言围棋不仅能增强思维能力,提高智力,而且富含哲理,有助于修身养性。同时它起源于中国,古称“弈”,是我国传统技艺之一。本游戏软件提供了人机对弈,和棋手对弈(局域网对弈)两种模式,局域网模式可以保证多人同时进行游戏。本软件使用C#语言编写,在windows7x64系统下采用VisualStudio2010开发和调试,附源码如下。客户端程序://-------------------login.cs---------//usingSystem;usingSystem.Collect

2、ions.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;namespacego{publicpartialclassLogin:Form{publicLogin(){InitializeComponent();}//人机对弈privatevoidbutton1_Click(objectsender,EventArgse){this

3、.Hide();Playingplaying=newPlaying();playing.ShowDialog();this.Show();}//局域网对弈privatevoidbutton2_Click(objectsender,EventArgse){弈秋围棋游戏软件V1.0源代码90this.Hide();FormRoomformroom=newFormRoom();formroom.ShowDialog();this.Show();}privatevoidbutton3_Click(objectsende

4、r,EventArgse){Application.Exit();}privatevoidbutton3_MouseEnter(objectsender,EventArgse){Buttonbtn=(Button)sender;btn.ForeColor=Color.Black;btn.BackColor=Color.White;}privatevoidbutton3_MouseLeave(objectsender,EventArgse){Buttonbtn=(Button)sender;btn.ForeCol

5、or=Color.White;btn.BackColor=Color.Black;}}}}//-------------------Playing.cs---------//usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;弈秋围棋游戏软件V1.0源代码90nam

6、espacego{publicpartialclassPlaying:Form{delegatevoidSetTextCallback(stringtext);privateenumStatus{NotStarted=0,InGame=1,RemoveDead=2,FillEmpty=3,Ended=4}privateSystem.Threading.Threadpc_play;privateBoardm_board=newBoard();privateChess.ChessTypem_turn=Chess.C

7、hessType.Black;privateintm_secondsBlack=0;privateintm_secondsWhite=0;privateTimerm_timer=newTimer();privateStatusm_status=Status.NotStarted;publicChess.ChessTypeturn{get{returnm_turn;}set{m_turn=value;this.SetTurn((m_turn.ToString()=="Black")?"黑方":"白方");}}弈秋

8、围棋游戏软件V1.0源代码90publicPlaying(){InitializeComponent();floath=this.Size.Height-10;floatw=this.Size.Width-140;m_board.ReSize(0,0,w,h);m_timer.Interval=1000;m_timer.Tick+=newEventHandler(timer_Tick)

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。