valid_moves updated for checkmate