select player + roundcount helper done
This commit is contained in:
+27
-1
@@ -1,5 +1,31 @@
|
||||
#include "chess.h"
|
||||
#include "util.h"
|
||||
|
||||
bool init_board(board_t *board) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void select_player(player_e *player, unsigned int round_count) {
|
||||
if (round_count == 1) {
|
||||
*player = WHITE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (*player == WHITE) {
|
||||
*player = BLACK;
|
||||
return;
|
||||
}
|
||||
|
||||
if (*player == BLACK) {
|
||||
*player = WHITE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bool get_move(move_t *move);
|
||||
|
||||
bool perform_move(player_e player, move_t move);
|
||||
|
||||
end_condition_e check_edge_cases(board_t board);
|
||||
|
||||
void announce_results(player_e player);
|
||||
Reference in New Issue
Block a user