bool is_board_full(unsigned int pawn_array[board_size][board_size]) {
/* an alternate method is to test the round count vs. 60 */
bool is_board_full(unsigned int pawn_array[board_size][board_size]) {
/* an alternate method is to test the round count vs. 60 */
- for (int i = 1; i <= board_size; i++) {
- for (int j = 1; j <= board_size; j++) {
+ for (unsigned int i = 1; i <= board_size; i++) {
+ for (unsigned int j = 1; j <= board_size; j++) {
if (is_box_type(i, j, pawn_array , empty)) {
return false;
}
if (is_box_type(i, j, pawn_array , empty)) {
return false;
}
@@ -206,9+206,9 @@ unsigned int eval_winner(unsigned int nb_white, unsigned int nb_black) {
}
}
}
}
-static unsigned int count_pawn_to_reverse_one_direction(int y, int x, unsigned int direction, unsigned int current_player, unsigned int pawn_array[board_size][board_size]) {
+static unsigned int count_pawn_to_reverse_one_direction(unsigned int y, unsigned int x, unsigned int direction, unsigned int current_player, unsigned int pawn_array[board_size][board_size]) {
unsigned int nb_pawns_reversed = 0;
unsigned int nb_pawns_reversed = 0;
- int moving_y = y, moving_x = x;
+ unsigned int moving_y = y, moving_x = x;
/* count the pawns to reverse in the chosen direction */
@@ -226,9+226,9 @@ static unsigned int count_pawn_to_reverse_one_direction(int y, int x, unsigned i
}
/* revert the pawns if needed in one direction */
}
/* revert the pawns if needed in one direction */
-static unsigned int reverse_one_direction(int y, int x, unsigned int direction, unsigned int current_player, unsigned int pawn_array[board_size][board_size], bool dry_run) {
+static unsigned int reverse_one_direction(unsigned int y, unsigned int x, unsigned int direction, unsigned int current_player, unsigned int pawn_array[board_size][board_size], bool dry_run) {