求一个简单的C#五子棋程序,要的是控制台输出的!

来源:百度知道 编辑:UC知道 时间:2024/05/16 14:20:25
最近留了个作业!让用控制台输出五子棋,只要人人对战即可!现在自己不明白的是,如何移动光标,来移动棋子和如何加个判断来判断5棋子连一起获胜,之前用的坐标在判定位置,不过好麻烦啊,自己就会这个笨方法,请大家帮帮忙,我刚学了没多久!谢谢大家,是控制台输出,不是WINFORM的!感谢大家了!

程序使用了vs.net环境编译,你的机器只要安装了.net framework sdk就可以运行。
源码和执行文件可以下载
你不想下载也可读一下源码(图片资源等需要下载)。
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