]> git.cworth.org Git - ttt/blob - src/test-board.c
2005-12-13 Carl Worth <cworth@cworth.org>
[ttt] / src / test-board.c
1 /* Test ttt-board.c */
2
3 #include "ttt-board.h"
4
5 int
6 main (void)
7 {
8     ttt_board_t board;
9     int m, i, newline;
10
11     ttt_board_init (&board);
12     
13     for (i = 0; i <= 8; i++)
14     {
15         printf ("This is the board \"");
16         ttt_board_write (&board, stdout);
17         printf ("\"\n");    
18
19         printf ("Make a move \n");
20         m = getchar() - '0';
21         newline = getchar();
22         ttt_board_make_move (&board, m);
23     }
24
25     printf ("This is the board \"");
26     ttt_board_write (&board, stdout);
27     printf ("\"\n");    
28
29
30     return 0;
31 }