Example #1
0
def test_room_completed(cards):
    r = Room(cards)
    r.select_card('j')
    r.select_card('k')
    r.select_card('l')
    r.select_card(';')
    assert r.completed() == True
Example #2
0
def test_room_not_completed(cards):
    r = Room(cards)
    r.select_card(';')
    assert r.completed() == False
Example #3
0
def test_room_select_card(cards):
    r = Room(cards, player_escaped_previous_room=True)
    card = r.select_card('k')
    assert card.suit == SPADE
    assert card.value == 2
Example #4
0
def test_room_previous_escaped(cards):
    r = Room(cards, player_escaped_previous_room=True)
    assert r.escapable() == False
    r.select_card('k')
    r.select_card('l')
    assert r.escapable() == True