Changed the board.move method to prune invalid moves and prevent moves that would lead to checks.