22 lines
703 B
Python
Raw Normal View History

2020-11-19 02:18:08 +01:00
from squirrelbattle.game import Game
from squirrelbattle.display.display_manager import DisplayManager
from squirrelbattle.term_manager import TermManager
2020-11-10 20:34:22 +01:00
class Bootstrap:
"""
2020-11-18 14:56:59 +01:00
The bootstrap object is used to bootstrap the game so that it starts
properly.
(It was initially created to avoid circular imports between the Game and
Display classes)
"""
@staticmethod
def run_game():
with TermManager() as term_manager: # pragma: no cover
game = Game()
game.new_game()
display = DisplayManager(term_manager.screen, game)
2020-11-12 01:57:56 +01:00
game.display_actions = display.handle_display_action
2020-11-10 20:34:22 +01:00
game.run(term_manager.screen)