master
simonkellet 3 years ago
parent bf7a214788
commit 9a4963f474
  1. 2
      README.md
  2. 9
      main.c

@ -4,7 +4,7 @@ A simple TicTacToe game written in C in under 2 hours!
## Usage
```bash
./build
./build.sh
```
then
```bash

@ -8,7 +8,7 @@
#define RED "\033[31m" /* Red */
#define BOLDGREEN "\033[1m\033[32m" /* Bold Green */
#define BOLDYELLOW "\033[1m\033[33m" /* Bold Yellow */
#define BOLDRED "\033[1m\033[31m" /* Bold Yellow */
#define BOLDRED "\033[1m\033[31m" /* Bold RED */
#define BOLDWHITE "\033[1m\033[37m" /* Bold White */
#define BOLDMAGENTA "\033[1m\033[35m" /* Bold Magenta */
#define RESET "\033[0m"
@ -30,7 +30,7 @@ int main(int argc, char *argv[]){
printf("How many players? (1/2)\n> ");
scanf("%d", &players);
//this could be tidier i think
//TODO Tidy this up!
if(players == 1){
do{
flag = check_win();
@ -40,12 +40,15 @@ int main(int argc, char *argv[]){
print_board();
player_choice('X');
//player_choice('X');
cpu_choice('X');
print_board();
sleep(2);
cpu_choice('O');
flag = check_win();
print_board();
sleep(2);
} while(flag == ' ');

Loading…
Cancel
Save