You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.3 KiB
77 lines
2.3 KiB
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <conio.h>
|
|
#include <string.h>
|
|
#define MAXIMUS 19
|
|
#define W 0x1177
|
|
#define S 0x1f73
|
|
#define A 0x1e61
|
|
#define D 0x2064
|
|
int p[MAXIMUS][MAXIMUS];
|
|
char buff[MAXIMUS*2+1][MAXIMUS*4+3];
|
|
int Cx,Cy;
|
|
int Now;
|
|
int wl,wp;
|
|
char* showText;
|
|
int count;
|
|
int bye();
|
|
int DoWin(int v);
|
|
char* Copy(char* strDest,const char* strSrc)
|
|
{
|
|
char* strDestCopy = strDest;
|
|
while (*strSrc!='\0')
|
|
{
|
|
*strDest++=*strSrc++;
|
|
}
|
|
return strDestCopy;
|
|
}
|
|
void Initialize()
|
|
{
|
|
int i,j;
|
|
showText="";
|
|
count=0;
|
|
for(i=0;i<MAXIMUS;i++)
|
|
{
|
|
for(j=0;j<MAXIMUS;j++)
|
|
{
|
|
p[i][j]=0;
|
|
}
|
|
}
|
|
Cx=Cy=MAXIMUS/2;
|
|
Now=1;
|
|
}
|
|
welcome() /*欢迎界面*/
|
|
{ Initialize(); /*初始化*/
|
|
system("cls"); /*清屏*/
|
|
system("color 2"); /*设置颜色*/
|
|
system("mode con cols=504 lines=512");/*样式*/
|
|
printf("\t╔════════════════╗\n");
|
|
printf("\t║ ║\n");
|
|
printf("\t║ 欢迎来到五子棋游戏,祝你玩的愉快! ║\n");
|
|
printf("\t║ ║\n");
|
|
printf("\t║ ._______________________. ║\n");
|
|
printf("\t║ | _____________________ | ║\n");
|
|
printf("\t║ | I I | ║\n");
|
|
printf("\t║ | I I | ║\n");
|
|
printf("\t║ | I 五 子 棋 I | ║\n");
|
|
printf("\t║ | I I | ║\n");
|
|
printf("\t║ | I___________________I | ║\n");
|
|
printf("\t║ !_______________________! ║\n");
|
|
printf("\t║ ._[__________]_. ║\n");
|
|
printf("\t║ .___|_______________|___. ║\n");
|
|
printf("\t║ |::: ____ | ║\n");
|
|
printf("\t║ | ~~~~ [CD-ROM] | ║\n");
|
|
printf("\t║ !_____________________! ║\n");
|
|
printf("\t║ ║\n");
|
|
printf("\t║ ║\n");
|
|
printf("\t║ ║\n");
|
|
printf("\t║ ║\n");
|
|
printf("\t║ 请按任意键继续,进入帮助界面。 ║\n");
|
|
printf("\t║ ▅▅ ║\n");
|
|
printf("\t║ ▅▅ ║\n");
|
|
printf("\t║ ▅▅ ║\n");
|
|
printf("\t║ ▅▅ ║\n");
|
|
printf("\t╚══════════════════╝\n");
|
|
getch();
|
|
}
|