X-Git-Url: https://git.cworth.org/git?p=ttt;a=blobdiff_plain;f=src%2Fttt-board.h;h=7f9c92dd1ea365fed55ff1082c0821ccf9e5666a;hp=dd2b6eb14681ffff1f055eb1da94171e230f67ef;hb=152ea9285ef3804783540d46263a7fc9802bc7db;hpb=cce891bb05118330ca609ac989491ad8a2fa7f71 diff --git a/src/ttt-board.h b/src/ttt-board.h index dd2b6eb..7f9c92d 100644 --- a/src/ttt-board.h +++ b/src/ttt-board.h @@ -22,9 +22,28 @@ #ifndef _TTT_BOARD_H_ #define _TTT_BOARD_H_ -typedef struct _ttt_board { - /* XXX: Fill this out with appropriate fields. */ +#include +#include +#include + +#define TTT_BOARD_MAX_CELLS 9 + +typedef struct ttt_board { + int cells[TTT_BOARD_MAX_CELLS]; } ttt_board_t; +void +ttt_board_init (ttt_board_t *board); + +void +ttt_board_init_from_string (ttt_board_t *board, + const char *s); + +char * +ttt_board_to_string (ttt_board_t *board); + +void +ttt_board_write (ttt_board_t *board, FILE *file); + #endif