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.
14 lines
504 B
14 lines
504 B
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <time.h>
|
|
#define ROW 3
|
|
#define COL 3
|
|
void printboard(char board[ROW][COL],int row,int col); //打印棋盘
|
|
void initboard(char board[ROW][COL],int row,int col); //初始化棋盘
|
|
void playermove(char board[ROW][COL],int row,int col); //玩家下棋
|
|
void computermove(char board[ROW][COL],int row,int col); //电脑下棋
|
|
char checkwin(char board[ROW][COL],int row,int col); //判输赢
|
|
int isfull(char board[ROW][COL],int row,int col); //判断棋盘是否为满
|
|
|