Example #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')
Example #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)
Example #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()