def test__mark_causes_win__should_return_true_if_horizontal_win(self): game = Game('test-grid', uuid.uuid4(), PLAYER_X, PLAYER_O) game.cells = [ Mark(0, 0, X_MARK), Mark(2, 0, X_MARK) ] win = game.mark_causes_win(Mark(1, 0, X_MARK)) assert win
def test__mark_causes_win__should_return_true_if_positive_slope_diagonal_win(self): game = Game('test-grid', uuid.uuid4(), PLAYER_X, PLAYER_O) game.cells = [ Mark(0, 2, X_MARK), Mark(2, 0, X_MARK) ] win = game.mark_causes_win(Mark(1, 1, X_MARK)) assert win