]> git.cworth.org Git - dvonn/blobdiff - dvonn-board.h
Enforce legal moves
[dvonn] / dvonn-board.h
index 2971a2738e31262c5658b8c944a74933c81d7f81..66464d8dee95d9fbd421dfc466cb70e6b3dfada9 100644 (file)
@@ -88,4 +88,17 @@ dvonn_board_move (dvonn_board_t *board,
                int x2, int y2,
                char **error);
 
+/* Is the cell at (x,y) occupied by a piece. Returns FALSE for all
+ * out-of-bounds coordinates. */
+dvonn_bool_t
+dvonn_board_cell_occupied (dvonn_board_t *board,
+                          int x, int y);
+
+/* Is the cell at (x,y) surrounded by other pieces, (such that it is
+ * not legal for a piece at (x,y) to move. */
+dvonn_bool_t
+dvonn_board_cell_surrounded (dvonn_board_t *board,
+                            int x, int y);
+
+
 #endif