c课程设计五子棋.docxVIP

  • 3
  • 0
  • 约6.5千字
  • 约 9页
  • 2021-01-01 发布于天津
  • 举报
/* 这是我们 c++ 课程设计五子棋,我用了许多循环语句,可能比较繁碎, 不过仔细分析的话,还是挺简单的。如果有什么不懂的地方可以加我 q 1570169994 */ #includestdio.h #includestdlib.h #includeconio.h // 这些是一些必要的头文件 #includewindows.h #includeiostream using namespace std; #define M 15 // 此处定义棋盘大小为 15*15 ,自己视情况而定 typedef struct Node { int a; // 这里定义的结点在悔棋时要用到 int b; struct Node *next; }node; class Qipan { // 定义一个棋盘类,这个类里有实现不同功能的函数 public: };int a,b,t; // 棋子的坐标我们用 a,b 表示, t 表示接收的输入信息 }; int player; //player int name[M][M]; // 为 1 时,代表绿方下棋, 2 代表红方 棋盘用一个 15*15 的二维数组表示 void explain(); // 此函数是解释说明的函数 void output(int count[]); // 此函数输出赢的一方 void gotoxy(int x,int y) {

文档评论(0)

1亿VIP精品文档

相关文档