it's getting over the top of my head :(
This commit is contained in:
+5
-4
@@ -137,10 +137,11 @@ bool is_none(board_t board, pos_t pos) {
|
|||||||
return board[pos.y][pos.x] == NONE;
|
return board[pos.y][pos.x] == NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// the move can be:
|
/** the move can be:
|
||||||
// 1. legal x illegal
|
* 1. legal x illegal
|
||||||
// 2. the 'to' pos could be occupied x non-occupied
|
* 2. the 'to' pos could be occupied x non-occupied
|
||||||
// 2a. it could be capturable x non-capturable
|
* 2a. it could be capturable x non-capturable
|
||||||
|
*/
|
||||||
bool validate_move(board_t board, move_t move) {
|
bool validate_move(board_t board, move_t move) {
|
||||||
bool none = is_none(board, move.to);
|
bool none = is_none(board, move.to);
|
||||||
bool move_legal = is_move_legal(move);
|
bool move_legal = is_move_legal(move);
|
||||||
|
|||||||
Reference in New Issue
Block a user