Beispiel #1
0
def _check_winner(state: GameState) -> bool:
    return _all_same(state.get_first_column())       or \
           _all_same(state.get_first_row())          or \
           _all_same(state.get_second_column())      or \
           _all_same(state.get_second_row())         or \
           _all_same(state.get_third_column())       or \
           _all_same(state.get_third_row())          or \
           _all_same(state.get_top_left_diagonal())  or \
           _all_same(state.get_top_right_diagonal())