]> git.cworth.org Git - dvonn/blobdiff - dvonn-board.h
Add a new dvonn_board_cell_owned_by function
[dvonn] / dvonn-board.h
index 7a361c3e6e3f3ebc2bdb415f9bae69352b096414..71923011e0ce07611de88a10454009e4d6f0137a 100644 (file)
@@ -100,6 +100,13 @@ dvonn_bool_t
 dvonn_board_cell_occupied (dvonn_board_t *board,
                           int x, int y);
 
+/* Is the cell at (x,y) occupied by a piece (or stack) with the given
+ * player's piece at the top. Returns FALSE for all out-of-bounds
+ * coordinates. */
+dvonn_bool_t
+dvonn_board_cell_owned_by (dvonn_board_t *board,
+                          int x, int y, dvonn_player_t player);
+
 /* 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