Ejemplo n.º 1
0
def test_could_collapse_error():
    tiles = []
    for _ in range(9):
        tiles.append(Tile())
    board = Board(tiles)
    with pytest.raises(InvalidCollapseError):
        board.could_collapse(1, 'x1')
Ejemplo n.º 2
0
def test_could_collapse():
    tiles = []
    for _ in range(9):
        tiles.append(Tile())
    board = Board(tiles)
    board.add_entangl_tile(1)
    board.add_entangl_tile(2)
    board.tiles()[1].set_move_on_tile('x1')
    board.tiles()[2].set_move_on_tile('x1')
    assert board.could_collapse(1, 'x1') is True