Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
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
Esempio n. 4
0
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
Esempio n. 5
0
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