예제 #1
0
def test_flip_reserve():
    (hand, reserve) = ([], [(2,), (5,), (11,)])
    (n_hand, n_reserve) = cards.flip_reserve(hand, reserve)
    assert len(n_hand) == 3
    assert n_reserve == []
    assert hand != n_hand
    assert reserve != n_reserve
예제 #2
0
def test_flip_reserve():
    (hand, reserve) = ([], [(2, ), (5, ), (11, )])
    (n_hand, n_reserve) = cards.flip_reserve(hand, reserve)
    assert len(n_hand) == 3
    assert n_reserve == []
    assert hand != n_hand
    assert reserve != n_reserve
예제 #3
0
파일: main.py 프로젝트: JoieDFW/wargame
def flip_if_needed(player, n=1):
    (hand, reserve) = player
    if len(hand) < n:
        (hand, reserve) = cards.flip_reserve(hand, reserve)
    return (hand, reserve)
예제 #4
0
파일: main.py 프로젝트: JoieDFW/wargame
def flip_if_needed(player, n=1):
    (hand, reserve) = player
    if len(hand) < n:
        (hand, reserve) = cards.flip_reserve(hand, reserve)
    return (hand, reserve)