C++的三子棋游戏,第一个版本,后期将继续出版!
#include<iostream>
#include<cstdio>
#include<windows.h>
#include<ctime>
using namespace std;
int checkerboard[4][4];
/*============== all class ==============*/
class chess {
public:
void Game_game();
};
/*============== all function ==============*/
int Game_init(){
printf(
" Three character chess game\n"
"\n"
" 1.enter 2.exit\n"
);
int retreat;
scanf("%d",&retreat);
return retreat;
}
void slow_o(string a,bool wrap){
for(int i=0;i<a.size();i++){
cout<<a[i];
Sleep(50);
}
if(wrap){
printf("\n");
}
}
void Game_user(){
printf(
" user interface\n"
" \n"
" 1.Start the game!\n"
" \n"
" 2.version\n"
" \n"
" 3.What the author said"
);
}
void Game_version(){
slow_o("Version: 0.0.1",1);
slow_o("Author:--",0);
}
void Gam