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.
 
 
 

23 lines
476 B

#ifndef TICTACTOE_H
#define TICTACTOE_H
#include <stdbool.h>
enum Winner{
PLAYER,
COMPUTER,
NOWINNERYET,
DRAW
};
void printPrompt();
void printField(char field[3][3]);
void initField(char field[3][3]);
void getPlayerInput(char field[3][3]);
bool validatePlayerInput(int row, int col);
int wasGameWon(char field[3][3]);
void getComputerInput(char field[3][3]);
void fillAlmostFull(char field[3][3], bool *pt);
int play();
void printWinner(int winner);
#endif