资源简介
音乐文件太大没上传 可以自行找一个 ".wav" 文件
改名为 "Boom.wav" 添加到 "Source"文件夹下
或者修改代码
代码片段和文件信息
#define _CRT_SECURE_NO_WARNINGS
#include
#include
#include
#include
#define H 15
int map[15][15]; //0为空,1为黑,2为白3为待选,4为13融合,5为23融合
//光标结构体
struct cursor
{
int x;
int y;
}point;
//棋盘初始化
void ini()
{
for (int i = 0; i <15; i++)
{
for (int j = 0; j < 15; j++)
{
map[i][j] = 0;
}
}
}
//是否继续 待完善
void go()
{
printf(“是否继续:\n是 y\t否 n“);
system(“pause“);
char choose;
scanf(“%c“ &choose);
if (choose==‘y‘)
{
ini();
}
else
{
exit(1);
}
}
//胜负判断
void check(int xint y)
{
int hei = 0 bai = 0;
for (int i = 0; i < H; i++) //横向判断
{
if ((map[x][i] == 0) || (map[x][i] == 3))
{
hei = 0;
bai = 0;
}
if ((map[x][i]==1)||(map[x][i]==4))
{
hei++;
bai = 0;
if (hei==5)
{
printf(“\t\t\t********黑方胜***********\n“);
go();
}
}
if ((map[x][i] == 2) || (map[x][i] == 5))
{
bai++;
hei = 0;
if (bai==5)
{
printf(“\t\t\t********白方胜***********\n“);
go();
}
}
}
hei = 0 bai = 0;
for (int i = 0; i < H; i++) //纵向判断
{
if ((map[i][y] == 0) ||( map[i][y] == 3))
{
hei = 0;
bai = 0;
}
if ((map[i][y] == 1) || (map[i][y] == 4))
{
hei++;
bai = 0;
if (hei == 5)
{
printf(“\t\t\t********黑方胜***********\n“);
go();
}
}
if ((map[i][y] == 2) || (map[i][y] == 5))
{
bai++;
hei = 0;
if (bai == 5)
{
printf(“\t\t\t********白方胜***********\n“);
go();
}
}
}
//斜向(\向)判断
int x1 = x y1 = y;
if (x1>y1)
{
x1 = x1 - y1;
y1 = 0;
}
else
{
y1 = y1 - x1;
x1 = 0;
}
hei = 0 bai = 0;
while ((x1 {
if ((map[x1][y1]==0)||(map[x1][y1]==3))
{
hei = 0;
bai = 0;
}
if ((map[x1][y1] == 1) || (map[x1][y1] == 4))
{
hei++;
bai = 0;
if (hei==5)
{
printf(“\t\t\t********黑方胜***********\n“);
go();
}
}
if ((map[x1][y1] == 2) || (map[x1][y1] == 5))
{
bai++;
hei = 0;
if (bai==5)
{
printf(“\t\t\t********白方胜***********\n“);
go();
}
}
x1++;
y1++;
}
//斜向(/向)判断
int x2 = x y2 = y;
if (x2>y2)
{
x2 = (x - (H - y));
y2 = H-1;
}
else
{
x2 =0;
y2 = (y +x);
}
hei = 0 bai = 0;
while ((y2>=0)&&(x2 {
if ((map[x2][y2] == 0) || (map[x2][y2] == 3))
{
hei = 0;
bai = 0;
}
if ((map[x2][y2] == 1) || (map[x2][y2] == 4))
{
hei++;
bai = 0;
if (hei == 5)
{
printf(“\t\t\t********黑方胜***********\n“);
go();
}
}
if ((map[x2][y2] == 2) || (map[x2][y2] == 5))
{
bai++;
hei = 0;
if (bai == 5)
{
printf(“\t\t\t********白方胜***********\n“);
go();
}
}
x2++;
y2--;
}
}
//打印棋盘
void prin()
{
system(“cls“);
for (int i = 0; i <15; i++)
{
printf(“\t\t“);
for (int j = 0; j < 15; j++)
{
if (map[i][j]==0)
{
printf(“╋“);
}
else
{
if ((map[i][j]==1) || (map[i][j] == 4))
{
printf(“●“);
}
if ((map[i][j]==2) || (map[i][j] == 5))
{
printf(“○“);
}
if ((map[i][j]==3))
{
printf
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-03-30 02:42 five-in-a-row-master\
目录 0 2019-03-30 02:42 five-in-a-row-master\MFC_Five\
文件 891 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five.sln
文件 32256 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five.v11.suo
目录 0 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\
文件 78755 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\FiveTest.cpp
文件 2018 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\FiveTest.h
文件 73480 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\MFC_Five.aps
文件 2394 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\MFC_Five.cpp
文件 454 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\MFC_Five.h
文件 10438 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\MFC_Five.rc
文件 6274 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\MFC_Five.vcxproj
文件 2335 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\MFC_Five.vcxproj.filters
文件 164 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\MFC_Five.vcxproj.user
文件 7351 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\MFC_FiveDlg.cpp
文件 888 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\MFC_FiveDlg.h
文件 3880 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\ReadMe.txt
目录 0 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\res\
文件 67777 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\res\MFC_Five.ico
文件 672 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\res\MFC_Five.rc2
文件 1380 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\resource.h
文件 141 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\stdafx.cpp
文件 1578 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\stdafx.h
文件 234 2019-03-30 02:42 five-in-a-row-master\MFC_Five\MFC_Five\targetver.h
目录 0 2019-03-30 02:42 five-in-a-row-master\MFC_Five\Source\
文件 488 2019-03-30 02:42 five-in-a-row-master\MFC_Five\Source\DefaultOut.txt
文件 489 2019-03-30 02:42 five-in-a-row-master\MFC_Five\Source\DefaultSave.txt
文件 759 2019-03-30 02:42 five-in-a-row-master\MFC_Five\Source\DefaultScore.txt
文件 480 2019-03-30 02:42 five-in-a-row-master\MFC_Five\Source\DefaultScoreWhite.txt
文件 4891 2019-03-30 02:42 five-in-a-row-master\MFC_Five\Source\Fail.png
文件 4550 2019-03-30 02:42 five-in-a-row-master\MFC_Five\Source\Level1.png
............此处省略17个文件信息
- 上一篇:彩色贪吃蛇.c
- 下一篇:socket通讯c++源码(客户端+服务端)
相关资源
- MFC UDP编程
- MFC的异步网络通讯应用程序
- C++MFC模块讲解,黑发程序员课程整理
- 一个简单而强大的基于MFC的web server源
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- MFCaccess.rar
- VC++MFC课程设计的学生成绩管理系统
- MFC 日历控件 万年历 Calendar自绘
- CrystalDiskInfo-HDD/SSD硬盘信息,SMART信息
- MFC自定义界面HUI,高效简单,含详细
- 仿射密码-Affine cipher
- c++MFC车牌自动识别定位,只能定位和
- mfc+sql 酒店客房管理系统
- 基于图割的图像分割OpenCV+MFC实现
- MFC绘制Bezier曲线B样条曲线曲线拟合
- 五子棋C++(Qt版).zip
- MFC坦克大战
- VC++ 中国象棋经典游戏源代码
- 课程设计: MFC 学生信息管理系统
- MFC对ACCESS数据库的增加、删除、查找
- vc.6.0 MFC 人事管理系统源码
- MFC 在线考试系统
- MFC基于对话框游戏 打字游戏1.0V
- 自绘CListCtrl聊天列表MFC
- MFC与坦克大战代码
- VC++酒店客房管理系统 MFC
- MFC实训_超市管理系统
- MFC游戏——看看你能坚持几秒
- VC++编程的第一个MFC工程Hello World
- 面向对象编程MFC综合实验代码
评论
共有 条评论