Removed pygame-menu and code cleanup
Added game class
This commit is contained in:
30
modules/Game_new.py
Normal file
30
modules/Game_new.py
Normal file
@@ -0,0 +1,30 @@
|
||||
#Behandelt später die Hauptschleife und Klassenobjekte
|
||||
class Game():
|
||||
def __init__(self) -> None:
|
||||
self.__state = {
|
||||
"started":False,
|
||||
"playermove":False,
|
||||
"win":False,
|
||||
"lose":False,
|
||||
"paused":False,
|
||||
"menu":False
|
||||
}
|
||||
|
||||
def get_state(self, state):
|
||||
return self.__state[state]
|
||||
|
||||
def change_state(self, state):
|
||||
"""Toggles the selected game state"""
|
||||
if(not self.__state[state]):
|
||||
self.__state[state] = True
|
||||
else:
|
||||
self.__state[state] = False
|
||||
|
||||
def scoreboard(self):
|
||||
pass
|
||||
|
||||
def spawn_fruit(self):
|
||||
pass
|
||||
|
||||
def spawn_player(self):
|
||||
pass
|
||||
Reference in New Issue
Block a user