init board
This commit is contained in:
+6
-2
@@ -3,7 +3,11 @@
|
||||
#include "util.h"
|
||||
|
||||
bool init_board(board_t *board) {
|
||||
|
||||
for (int i = 0; i < BOARD_VERTICAL; i++) {
|
||||
for (int j = 0; j < BOARD_HORIZONTAL; j++) {
|
||||
*board[i][j] = BOARD_DEFAULT_CONFIG[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void select_player(player_e *player, unsigned int round_count) {
|
||||
@@ -48,7 +52,7 @@ bool is_move_in_bounds(move_t move) {
|
||||
|
||||
bool get_move(move_t *move) {
|
||||
clear_stdin();
|
||||
|
||||
|
||||
char _x_from, _x_to;
|
||||
int _y_from, _y_to;
|
||||
scanf("%c%d %c%d",
|
||||
|
||||
Reference in New Issue
Block a user