Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool check_valid_move(const int original_board[MAX_SIZE][MAX_SIZE], const int current_board[MAX_SIZE][MAX_SIZE], int size, int row, int col, int color) { //the move must not change any of the original squares if (original_board[row][col] != UNKNOWN){ cout << "Sorry, original squares cannot be changed."; return false; } //the move must follow the main rules of the game else if (!board_has_no_threes(current_board, size)){ cout << "Sorry, that move violates a rule."; return false; } else if (!board_has_no_duplicates(current_board, size)){ cout << "Sorry, that move violates a rule."; return false; } return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement