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.
38 lines
694 B
38 lines
694 B
#ifndef SANZIQI_H_INCLUDED
|
|
#define SANZIQI_H_INCLUDED
|
|
#include <time.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#define computer_first 1
|
|
#define player_first 2
|
|
#define start_game 1
|
|
#define end_game 0
|
|
#define full 9
|
|
#define empty 0
|
|
void mode();
|
|
|
|
void init_board(char arr[3][3]); //初始化棋盘
|
|
|
|
void print_board(char arr[3][3]); //打印棋盘
|
|
|
|
void menu(); //菜单
|
|
|
|
int who_act(); //选择谁先行动
|
|
|
|
int check_(char arr[3][3]); //判断棋盘状态
|
|
|
|
|
|
char judge_win(char arr[3][3]); //判断输赢
|
|
|
|
|
|
void player_act(char arr[3][3]); //玩家行动
|
|
|
|
void computer_act_easy(char arr[3][3]); //电脑行动
|
|
|
|
void computer_act_normal(char arr[3][3]);
|
|
|
|
|
|
|
|
|
|
#endif // SANZIQI_H_INCLUDED
|