summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2021-07-26 00:06:45 -0400
committerRobby Zambito <contact@robbyzambito.me>2021-07-26 00:06:45 -0400
commit9960fa968af7d862a88eacc7b44a3c727ad0e3e8 (patch)
treee8ffc1ad0a8f9eece35bb4be050aac6cc55a930f
parent9450db5f57ecea59a021916e92db19550e94748a (diff)
No need to add 1 to the player_number_from_color
It already returns 1 for player 1 and 2 for player 2.
-rw-r--r--src/game_loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game_loop.c b/src/game_loop.c
index c76f7e6..f71d204 100644
--- a/src/game_loop.c
+++ b/src/game_loop.c
@@ -86,7 +86,7 @@ static void apply_move(enum player_color board[8][8],
// We should have checked for the validity of the move before we got here.
fprintf(stderr, "The move %d %d was not valid for player %d\n", move.row,
- move.col, player_number_from_color(current_player) + 1);
+ move.col, player_number_from_color(current_player));
exit(EXIT_FAILURE);
}