gamelogic

This commit is contained in:
2021-03-14 13:59:13 +01:00
parent 4c1d8b7206
commit 06acfdc1e2
4 changed files with 192 additions and 28 deletions

View File

@@ -5,4 +5,18 @@ import pywerwolf.gamelogic as gl
def test_game_init():
g = gl.Game()
assert g.game_id is not None
def test_game_start_next_transition():
g = gl.Game()
g.start_game()
assert g.game_id is not None
assert g.statemachine.state == gl.GameState.start_game is not None
def test_game_start_with_player_not_ready():
g = gl.Game()
g.add_player()
g.start_game()
assert g.game_id is not None
assert g.statemachine.state == gl.GameState.waiting_for_players is not None