Spaces:
Running
Running
| from engine.game.player_state import PlayerState | |
| def test_score_is_count_of_lives(): | |
| p = PlayerState(0) | |
| # Init | |
| assert p.score == 0 | |
| # Add 1 live | |
| p.success_lives.append(1001) | |
| assert p.score == 1 | |
| # Add 2 more | |
| p.success_lives.append(1002) | |
| p.success_lives.append(1003) | |
| assert p.score == 3 | |
| # Verify it ignores card data (conceptually, though we don't have DB here) | |
| # The property should just be length. | |