软著申请源代码.doc

软著申请源代码.doc

ID:53786174

大小:54.77 KB

页数:61页

时间:2020-04-07

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

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

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

2、singSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;namespacego{publicpartialclassLogin:Form{publicLogin(){InitializeComponent();}//人机对弈privatevoidbutton1_Click(objectsender,EventArgse){this.Hide();Playingplaying=newPlaying();playing.ShowDialog();this.Show

3、();}//局域网对弈privatevoidbutton2_Click(objectsender,EventArgse){this.Hide();FormRoomformroom=newFormRoom();formroom.ShowDialog();this.Show();}privatevoidbutton3_Click(objectsender,EventArgse){Application.Exit();}privatevoidbutton3_MouseEnter(objectsender,EventArgse){Buttonbtn=(Button)s

4、ender;btn.ForeColor=Color.Black;btn.BackColor=Color.White;}privatevoidbutton3_MouseLeave(objectsender,EventArgse)..{Buttonbtn=(Button)sender;btn.ForeColor=Color.White;btn.BackColor=Color.Black;}}}}//-------------------Playing.cs---------//usingSystem;usingSystem.Collections.Generic;

5、usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;namespacego{publicpartialclassPlaying:Form{delegatevoidSetTextCallback(stringtext);privateenumStatus{NotStarted=0,InGame=1,RemoveDead=2,FillEmpty=3,Ended=4}privateSystem.Thread

6、ing.Threadpc_play;privateBoardm_board=newBoard();privateChess.ChessTypem_turn=Chess.ChessType.Black;privateintm_secondsBlack=0;privateintm_secondsWhite=0;privateTimerm_timer=newTimer();privateStatusm_status=Status.NotStarted;publicChess.ChessTypeturn{get{returnm_turn;}set{m_turn=val

7、ue;this.SetTurn((m_turn.ToString()=="Black")?"黑方":"白方");}}publicPlaying()..{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);TimeSpantm=newTimeSpan(0,0,0);labelTimeBlac

8、k.Text=tm.ToString(

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

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

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