mirror of
https://github.com/maoakeEnterprise/amazing.git
synced 2026-04-28 16:04:35 +02:00
give a checkpoint to the project blink the 42
This commit is contained in:
+3
-4
@@ -249,7 +249,9 @@ class MazeMLX:
|
|||||||
color = next(self.color_gen_ft)
|
color = next(self.color_gen_ft)
|
||||||
color
|
color
|
||||||
else:
|
else:
|
||||||
|
self.update_maze(amazing.maze.get_maze())
|
||||||
self.draw_ft(amazing.maze.get_maze())
|
self.draw_ft(amazing.maze.get_maze())
|
||||||
|
self.put_start_end(amazing)
|
||||||
self.redraw_image()
|
self.redraw_image()
|
||||||
|
|
||||||
def shift_color(self):
|
def shift_color(self):
|
||||||
@@ -277,14 +279,12 @@ class MazeMLX:
|
|||||||
try:
|
try:
|
||||||
next(self.generator)
|
next(self.generator)
|
||||||
self.update_maze(amazing.maze.get_maze())
|
self.update_maze(amazing.maze.get_maze())
|
||||||
self.put_start_end(amazing)
|
|
||||||
return False
|
return False
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
pass
|
pass
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def handle_key_press(self, keycode: int, amazing: AMazeIng) -> None:
|
def handle_key_press(self, keycode: int, amazing: AMazeIng) -> None:
|
||||||
print(keycode)
|
|
||||||
if keycode == 49:
|
if keycode == 49:
|
||||||
self.restart_maze(amazing)
|
self.restart_maze(amazing)
|
||||||
self.print_path = False
|
self.print_path = False
|
||||||
@@ -298,7 +298,6 @@ class MazeMLX:
|
|||||||
self.close_loop(None)
|
self.close_loop(None)
|
||||||
|
|
||||||
def handle_key_press_mteriier(self, keycode: int, amazing: AMazeIng) -> None:
|
def handle_key_press_mteriier(self, keycode: int, amazing: AMazeIng) -> None:
|
||||||
print(keycode)
|
|
||||||
if keycode == 38:
|
if keycode == 38:
|
||||||
self.restart_maze(amazing)
|
self.restart_maze(amazing)
|
||||||
self.print_path = False
|
self.print_path = False
|
||||||
@@ -326,7 +325,7 @@ class MazeMLX:
|
|||||||
def main() -> None:
|
def main() -> None:
|
||||||
mlx = None
|
mlx = None
|
||||||
try:
|
try:
|
||||||
mlx = MazeMLX(1800, 1800)
|
mlx = MazeMLX(1000, 1000)
|
||||||
config = Parsing.DataMaze.get_data_maze("config.txt")
|
config = Parsing.DataMaze.get_data_maze("config.txt")
|
||||||
amazing = AMazeIng(**config)
|
amazing = AMazeIng(**config)
|
||||||
mlx.start(amazing)
|
mlx.start(amazing)
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
WIDTH=30
|
WIDTH=13
|
||||||
HEIGHT=30
|
HEIGHT=13
|
||||||
ENTRY=1,1
|
ENTRY=1,1
|
||||||
EXIT=5,5
|
EXIT=5,5
|
||||||
OUTPUT_FILE=maze.txt
|
OUTPUT_FILE=maze.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user