get rid of warnings
This commit is contained in:
+4
-2
@@ -159,14 +159,16 @@ bool validate_move(board_t board, move_t move) {
|
||||
|
||||
/** TODO: capturing and promotions */
|
||||
bool perform_move(board_t *board, player_e player, move_t move) {
|
||||
if (validate_move(*board, move) == true) {
|
||||
bool move_valid = validate_move(*board, move);
|
||||
if (move_valid == true) {
|
||||
*board[move.to.y][move.to.x] = move.piece; // move piece to wanted place
|
||||
*board[move.from.y][move.from.x] = NONE; // erase the remnants
|
||||
}
|
||||
return move_valid;
|
||||
}
|
||||
|
||||
end_condition_e check_edge_cases(board_t board) {
|
||||
|
||||
return CHECKMATE;
|
||||
}
|
||||
|
||||
void announce_results(end_condition_e end_condition, player_e player) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// a chess implementation in pure C :)
|
||||
|
||||
#include "util.h"
|
||||
#include "chess.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
/**
|
||||
* steps to victory:
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
|
||||
// misc. defines and methods
|
||||
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
// for input handling consistency
|
||||
void clear_stdin();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user