]> git.cworth.org Git - ttt/blobdiff - src/ttt-board.h
2005-11-25 Bryan Worth <bryan@theworths.org>
[ttt] / src / ttt-board.h
index dd2b6eb14681ffff1f055eb1da94171e230f67ef..c589a7716f211bfbd849dc4110393cc03d7a73ac 100644 (file)
 #ifndef _TTT_BOARD_H_
 #define _TTT_BOARD_H_
 
-typedef struct _ttt_board {
-    /* XXX: Fill this out with appropriate fields. */
+#include "ttt.h"
+
+#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