コード例 #1
0
ファイル: test_hand.py プロジェクト: henriksu/qwirkle
def test_starting_score_better_shape():
    tiles_in_hand = [
        Tile(Color.RED, Shape.X),
        Tile(Color.ORANGE, Shape.X),
        Tile(Color.YELLOW, Shape.X),
        Tile(Color.GREEN, Shape.STAR),
        Tile(Color.RED, Shape.STAR),
        Tile(Color.PURPLE, Shape.STAR)
    ]
    hand = Hand(tiles_in_hand)
    assert hand.starting_score() == 3
コード例 #2
0
ファイル: test_hand.py プロジェクト: henriksu/qwirkle
def test_starting_score_better_color():
    tiles_in_hand = [
        Tile(Color.RED, Shape.CIRCLE),
        Tile(Color.RED, Shape.X),
        Tile(Color.RED, Shape.DIAMOND),
        Tile(Color.YELLOW, Shape.X),
        Tile(Color.GREEN, Shape.STAR),
        Tile(Color.PURPLE, Shape.CLOVER)
    ]
    hand = Hand(tiles_in_hand)
    assert hand.starting_score() == 3
コード例 #3
0
ファイル: test_hand.py プロジェクト: henriksu/qwirkle
def test_starting_score_identical_tiles_color():
    tiles_in_hand = [
        Tile(Color.RED, Shape.CIRCLE),
        Tile(Color.RED, Shape.X),
        Tile(Color.RED, Shape.DIAMOND),
        Tile(Color.RED, Shape.X),
        Tile(Color.RED, Shape.STAR),
        Tile(Color.RED, Shape.CLOVER)
    ]
    hand = Hand(tiles_in_hand)
    assert hand.starting_score() == 5
コード例 #4
0
ファイル: test_hand.py プロジェクト: henriksu/qwirkle
def test_starting_score_identical_tiles_shape():
    tiles_in_hand = [
        Tile(Color.RED, Shape.X),
        Tile(Color.ORANGE, Shape.X),
        Tile(Color.YELLOW, Shape.X),
        Tile(Color.GREEN, Shape.X),
        Tile(Color.RED, Shape.X),
        Tile(Color.PURPLE, Shape.X)
    ]
    hand = Hand(tiles_in_hand)
    assert hand.starting_score() == 5
コード例 #5
0
ファイル: test_hand.py プロジェクト: henriksu/qwirkle
def test_worst_starting_score():
    tiles_in_hand = [
        Tile(Color.RED, Shape.CIRCLE),
        Tile(Color.ORANGE, Shape.X),
        Tile(Color.YELLOW, Shape.DIAMOND),
        Tile(Color.GREEN, Shape.SQUARE),
        Tile(Color.BLUE, Shape.STAR),
        Tile(Color.PURPLE, Shape.CLOVER)
    ]
    hand = Hand(tiles_in_hand)
    assert hand.starting_score() == 1