X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fttt-board.c;h=27fb19ee939e82df9921bf173b949135b90c98b4;hb=add37ecc4ee6485d9f91f95f1c983abf867da2c6;hp=9a8d719f95e9a173bc76cfd14d93c1832008a195;hpb=75d32f38216f0d23936f62f85d3a1e45b07d543c;p=ttt diff --git a/src/ttt-board.c b/src/ttt-board.c index 9a8d719..27fb19e 100644 --- a/src/ttt-board.c +++ b/src/ttt-board.c @@ -21,14 +21,19 @@ #include "ttt-board.h" +struct _ttt_board { + int cells[TTT_BOARD_MAX_CELLS]; +}; + /* Initialize an empty board. */ void ttt_board_init (ttt_board_t *board) { - for (int i; i < TTT_BOARD_MAX_CELLS; i++) - { - &board->cells[i] = 0; - } + int i; + for (i = 0; i < TTT_BOARD_MAX_CELLS; i++) + { + board->cells[i] = 0; + } } /* Initialize a board from its string representation. @@ -54,6 +59,7 @@ char * ttt_board_to_string (ttt_board_t *board) { /* XXX: NYI */ + return NULL; } /* Write a string representation of a board to the provided file.