def test__mark_cell_by_coordinates__adds_mark_to_cells(self): game = Game('test-grid', uuid.uuid4(), PLAYER_X, PLAYER_O) game.mark_cell_by_coordinates(1, 1, X_MARK) actual_mark = game.get_cell_by_coordinates(1, 1) assert actual_mark.value == X_MARK
def test__mark_cell_by_coordinates_raises_exception_when_mark_outside(self): game = Game('test-grid', uuid.uuid4(), PLAYER_X, PLAYER_O) with pytest.raises(OutOfBoundsException): game.mark_cell_by_coordinates(-1, 0, X_MARK) with pytest.raises(OutOfBoundsException): game.mark_cell_by_coordinates(0, -1, X_MARK) with pytest.raises(OutOfBoundsException): game.mark_cell_by_coordinates(3, 0, X_MARK) with pytest.raises(OutOfBoundsException): game.mark_cell_by_coordinates(0, 3, X_MARK)