Ejemplo n.º 1
0
def test_score_team_slots_separate():
    score_data = {
        "robot_moved": True,
        "zones_owned": [],
        "slots_owned": [0, 2],
        "upright_tokens": 0,
    }
    score = score_team(score_data)
    assert score == 3
Ejemplo n.º 2
0
def test_score_team_slots_adjacent():
    score_data = {
        "robot_moved": True,
        "zones_owned": [],
        "slots_owned": [0, 1],
        "upright_tokens": 0,
    }
    score = score_team(score_data)
    assert score == 5
Ejemplo n.º 3
0
def test_score_team_upright_tokens_2():
    score_data = {
        "robot_moved": True,
        "zones_owned": [],
        "slots_owned": [],
        "upright_tokens": 3,
    }
    score = score_team(score_data)
    assert score == 4
Ejemplo n.º 4
0
def test_score_team_zero():
    score_data = {
        "robot_moved": False,
        "zones_owned": [],
        "slots_owned": [],
        "upright_tokens": 0,
    }
    score = score_team(score_data)
    assert score == 0
Ejemplo n.º 5
0
def test_score_team_slots_separate():
    score_data = {
        "robot_moved": True,
        "zones_owned": [],
        "slots_owned": [0, 2],
        "upright_tokens": 0,
    }
    score = score_team(score_data)
    assert score == 3
Ejemplo n.º 6
0
def test_score_team_mixed_1():
    score_data = {
        "robot_moved": True,
        "zones_owned": [1, 2],
        "slots_owned": [0, 1, 3],
        "upright_tokens": 4,
    }
    score = score_team(score_data)
    assert score == 12
Ejemplo n.º 7
0
def test_score_team_slots_adjacent():
    score_data = {
        "robot_moved": True,
        "zones_owned": [],
        "slots_owned": [0, 1],
        "upright_tokens": 0,
    }
    score = score_team(score_data)
    assert score == 5
Ejemplo n.º 8
0
def test_score_team_zero():
    score_data = {
        "robot_moved": False,
        "zones_owned": [],
        "slots_owned": [],
        "upright_tokens": 0,
    }
    score = score_team(score_data)
    assert score == 0
Ejemplo n.º 9
0
def test_score_team_upright_tokens_2():
    score_data = {
        "robot_moved": True,
        "zones_owned": [],
        "slots_owned": [],
        "upright_tokens": 3,
    }
    score = score_team(score_data)
    assert score == 4
Ejemplo n.º 10
0
def test_score_team_mixed_1():
    score_data = {
        "robot_moved": True,
        "zones_owned": [1, 2],
        "slots_owned": [0, 1, 3],
        "upright_tokens": 4,
    }
    score = score_team(score_data)
    assert score == 12
Ejemplo n.º 11
0
def test_score_team_slots_around_end():
    # Slots 3 and 4 are numerically adjacent, but don't qualify for the bonus
    score_data = {
        "robot_moved": True,
        "zones_owned": [],
        "slots_owned": [3, 4],
        "upright_tokens": 0,
    }
    score = score_team(score_data)
    assert score == 3
Ejemplo n.º 12
0
def test_score_team_slots_around_end():
    # Slots 3 and 4 are numerically adjacent, but don't qualify for the bonus
    score_data = {
        "robot_moved": True,
        "zones_owned": [],
        "slots_owned": [3, 4],
        "upright_tokens": 0,
    }
    score = score_team(score_data)
    assert score == 3
Ejemplo n.º 13
0
 def calculate_scores(self):
     scores = {}
     for tla, score_data in self.isolated_scores.items():
         scores[tla] = score_team(score_data)
     return scores
Ejemplo n.º 14
0
 def calculate_scores(self):
     scores = {}
     for tla, score_data in self.isolated_scores.items():
         scores[tla] = score_team(score_data)
     return scores