From 88af80875cbaf87b9341ae04147982cf5d708681 Mon Sep 17 00:00:00 2001 From: ellielle <40385743+ellielle@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:31:47 -0500 Subject: [PATCH] fix: change window size, colors of solving line --- canvas.py | 6 ++---- main.py | 4 ++-- maze.py | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/canvas.py b/canvas.py index d47447c..bd909ea 100644 --- a/canvas.py +++ b/canvas.py @@ -8,7 +8,6 @@ def __init__(self, width, height): self.__root.protocol("WM_DELETE_WINDOW", self.close) self.width = width self.height = height - self.title = self.__root self.canvas = Canvas( master=self.__root, width=self.width, height=self.height, bg="white" ) @@ -61,11 +60,10 @@ class Cell: undo_colors = [ "cyan", "magenta", - "pink", + "blue", "orange", "lime", - "deeppink", - "saddlebrown", + "hotpink", "deepskyblue", "gold", ] diff --git a/main.py b/main.py index 140453f..670d5ed 100644 --- a/main.py +++ b/main.py @@ -3,8 +3,8 @@ def main(): - win = Window(800, 600) - maze = Maze(20, 20, 12, 16, 20, 20, win) + win = Window(550, 550) + maze = Maze(25, 25, 20, 20, 25, 25, win) maze.solve() win.wait_for_close() diff --git a/maze.py b/maze.py index 39249f0..09834de 100755 --- a/maze.py +++ b/maze.py @@ -15,7 +15,7 @@ def __init__( self._cells = [[] for _ in range(self.num_cols)] self.cell_size_x = cell_size_x self.cell_size_y = cell_size_y - self.__sleep_constant = 0.00 + self.__sleep_constant = 0.03 self._create_cells() if seed: random.seed(seed)