prob. finished the pseudocode in main.c
This commit is contained in:
+18
@@ -16,14 +16,32 @@
|
||||
*/
|
||||
|
||||
int main() {
|
||||
// variable defs
|
||||
board_t board;
|
||||
move_t move;
|
||||
player_e player;
|
||||
end_condition_e end_condition;
|
||||
bool running = true;
|
||||
|
||||
// algo begin
|
||||
|
||||
init_board(&board);
|
||||
|
||||
while (running) {
|
||||
|
||||
select_player(&player);
|
||||
|
||||
get_move(&move);
|
||||
|
||||
perform_move(player, move);
|
||||
|
||||
end_condition = check_edge_cases(board);
|
||||
if (end_condition == CHECKMATE || end_condition == STALEMATE) {
|
||||
running = false;
|
||||
}
|
||||
}
|
||||
|
||||
announce_results(player);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user