数据结构课程设计实验报告五子棋

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

湖南科技学院实验报告

系部:计算机与通信工程系

专业:软件工程

姓名:范清文

学号:201008003113

班级:软件1001班

课程名称:数据结构程序课程设计

指导老师:卿武明

实验项目:制作简单的五子棋

课程设计目的:1:对本学期所学的专业知识进行实践运用

2:制作五子棋并实现它的图示化

实验环境:Visual C++6.0

实验内容(算法、程序、步骤和方法):

#include

#include

using namespace std;

int x,y,Step=0;

bool flag=0;

char Switch;

char map[20][20][3]={ {"┌","┬","┬","┬","┬","┬","┬","┬","┬","┬","┬","┬","┬","┬","┬","┬","┬","┬","┬","┐"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"├","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┼","┤"}, {"└","┴","┴","┴","┴","┴","┴","┴","┴","┴","┴","┴","┴","┴","┴","┴","┴","┴","┴","┘"}}; char copymap[20][20][2];

float Player[20][20][1];

int Table[20][20] ,Showboard(),Play(),Interface(),Initboard(),Judgewin(),Deuce() ,Initdata();

bool legal(),Overflow();

int Interface()

{

char a;

cout << "\n\n五子棋\n \t\t─\n 制作人:范清文(201008003113)\n\t\t────\n";

cout << " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << endl;

cout << " ~~ ~~" << endl;

cout << " ~~ 1:人人对战~~" << endl;

cout << " ~~ ~~" << endl;

cout << " ~~ 2:退出~~" << endl;

cout << " ~~ ~~" << endl;

cout << " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << endl;

cout << "\n 请选择:";

cin >> a;

if(a=='2')

{

相关文档
最新文档