init -> __init__
This commit is contained in:
parent
a1731dc9f7
commit
dc0d478d1e
|
@ -25,10 +25,7 @@ class KeyValues(Enum):
|
||||||
|
|
||||||
|
|
||||||
class Game:
|
class Game:
|
||||||
INSTANCE = None
|
def __init__(self) -> None:
|
||||||
|
|
||||||
def init(self) -> None:
|
|
||||||
Game.INSTANCE = self
|
|
||||||
self.state = GameMode.MAINMENU
|
self.state = GameMode.MAINMENU
|
||||||
self.main_menu = menus.MainMenu()
|
self.main_menu = menus.MainMenu()
|
||||||
self.settings = Settings()
|
self.settings = Settings()
|
||||||
|
|
1
main.py
1
main.py
|
@ -5,6 +5,5 @@ from dungeonbattle.term_manager import TermManager
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
with TermManager() as term_manager:
|
with TermManager() as term_manager:
|
||||||
game = Game()
|
game = Game()
|
||||||
game.init()
|
|
||||||
game.new_game()
|
game.new_game()
|
||||||
game.run(term_manager.screen)
|
game.run(term_manager.screen)
|
||||||
|
|
Loading…
Reference in New Issue