教程集 www.jiaochengji.com
教程集 >  操作系统  >  windows  >  正文 去年用c#写的五子棋程序

去年用c#写的五子棋程序

发布时间:2019-12-16   编辑:jiaochengji.com
教程集为您提供去年用c#写的五子棋程序等资源,欢迎您收藏本站,我们将为您提供最新的去年用c#写的五子棋程序资源
c#写的五子棋程序,供学习WinForms的鼠标事件和使用GDI
前几天没事(是去年的事了),写了一个小程序,可以用于学习C#。
程序使用了VS.NET环境编译,你的机器只要安装了.NET Framework SDK就可以运行。
源码和执行文件可以下载
http://www.wh-adv.com/download/five.zip
你不想下载也可读一下源码(图片资源等需要下载)。
namespace Leimom.FiveChess
{
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.WinForms;
using System.Data;
/// <summary>
/// Summary description for Form1.
/// </summary>
public class FiveForm : System.WinForms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components;
private System.WinForms.ImageList imageListbw;
//define the hot Rectangle
private Rectangle[] pointSquares;
//chess information
private int[] chessTable;
private int nextTurn;
private const int bTurn = 1;
private const int wTurn = 2;
private Stack chessIndex;
public FiveForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
chessIndex = new Stack();
nextTurn = bTurn;
chessTable = new int[225];
pointSquares = new Rectangle[225];
Size size = new Size(18,18);
int x = 0;
int y = 0;
for(int i = 0;i < 225;i )
{
x = i;
y = i/15;

您可能感兴趣的文章:
去年用c#写的五子棋程序
JQuery 国际象棋棋盘 实现代码
python怎么做游戏
canvas实现五子棋游戏的代码示例
Python异常机制使用细则,正确使用Python异常处理机制
computer go
浅谈Python异常处理机制
Python就业方向指南
用C#实现简单的控件数组
vbscript基础教程-数组

[关闭]
~ ~