Beispiel #1
0
 def test_started_after_stopped(self):
     game = Game(name="TestGame",
                 console=Console(),
                 player=Player("TestPlayer"))
     with self.assertRaises(GameStoppedException):
         game.stop()
         game.start(running_mode='test')
Beispiel #2
0
 def test_started(self):
     game = Game(name="TestGame",
                 console=Console(),
                 player=Player("TestPlayer"))
     game.start(running_mode='test')
     self.assertEqual(game.running, True)
Beispiel #3
0
from game.console import Console
from game.core import Game, Player

console = Console()
player = Player("TestPlayer")

game = Game(name="TestGame", console=console, player=player)
game.start()