summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2021-11-21 16:08:23 -0500
committerRobby Zambito <contact@robbyzambito.me>2021-11-21 16:08:23 -0500
commit0ed931c4ff167c957c0b772b7d3c73a7e6dcb403 (patch)
tree7fa39a7b91b632aa00bfd3e4f92620b6bf8d5474 /include
parent941b48199327eb25bafed119ded73fa16f63e1ae (diff)
Added function pointer for getting the player move.
If the player is an AI one, it will point to a function that will return the move from the AI. If the player is a human, it will point to a function that will prompt the user for input.
Diffstat (limited to 'include')
-rw-r--r--include/othello.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/othello.h b/include/othello.h
index 6c27c46..cd3dbac 100644
--- a/include/othello.h
+++ b/include/othello.h
@@ -33,6 +33,12 @@ struct move {
int col;
};
+// Function pointers for each players move function
+extern struct move (*player_one_get_move)(enum player_color board[8][8],
+ enum player_color current_player);
+extern struct move (*player_two_get_move)(enum player_color board[8][8],
+ enum player_color current_player);
+
// Set a board to a new game state.
void initialize_board(enum player_color board[8][8]);