def make_move(board, move, ch): """ Puts ch on board as dictated by move. Returns (game_decided, winner) """ board[move['row']][move['col']] = ch winner = board_winner(board) if winner is not None: return True, winner if not board_has_move(board): return True, None return False, None
def test_win_6(self): board = [[x_char, None, o_char], [x_char, o_char, x_char], [o_char, o_char, None]] self.assertEqual(board_winner(board), o_char)