Add Mice! game and associated tools
- Created gameinfo.xml for the Mice! game, detailing its description, release date, developer, and genre. - Added mice.sh script to activate the conda environment and run the game. - Implemented colorize_assets.py as a placeholder for future asset colorization functionality. - Developed convert_audio.py to convert audio files to 8-bit unsigned format at 22100 Hz. - Introduced maze.py for generating mazes using Depth First Search (DFS) with a graphical interface. - Created resize_assets.py to resize PNG assets to 18x18 pixels and center them on a 20x20 canvas.
This commit is contained in:
@@ -38,6 +38,17 @@ class MiceMaze(
|
||||
self.start_game()
|
||||
self.background_texture = None
|
||||
self.configs = self.get_config()
|
||||
|
||||
|
||||
def get_config(self):
|
||||
configs = {}
|
||||
for file in os.listdir("conf"):
|
||||
if file.endswith(".json"):
|
||||
with open(os.path.join("conf", file)) as f:
|
||||
configs[file[:-5]] = json.load(f)
|
||||
return configs
|
||||
|
||||
def start_game(self):
|
||||
self.ammo = {
|
||||
"bomb": {
|
||||
"count": 2,
|
||||
@@ -52,16 +63,6 @@ class MiceMaze(
|
||||
"max": 5
|
||||
}
|
||||
}
|
||||
|
||||
def get_config(self):
|
||||
configs = {}
|
||||
for file in os.listdir("conf"):
|
||||
if file.endswith(".json"):
|
||||
with open(os.path.join("conf", file)) as f:
|
||||
configs[file[:-5]] = json.load(f)
|
||||
return configs
|
||||
|
||||
def start_game(self):
|
||||
self.blood_stains = {}
|
||||
self.background_texture = None
|
||||
for _ in range(5):
|
||||
@@ -140,7 +141,7 @@ class MiceMaze(
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
print("Game starting...")
|
||||
solver = MiceMaze('maze.json')
|
||||
solver.run()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user