summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authoryuzu-eva <stevenhu@web.de>2024-11-11 15:52:22 +0100
committeryuzu-eva <stevenhu@web.de>2024-11-11 15:52:22 +0100
commit696199a0227cfccb2247978b1ba8c1b03f1ae26d (patch)
tree493c3f65fdb65634c1577529bcfbf76356d9ec4f /main.py
initial commit
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100755
index 0000000..56f0817
--- /dev/null
+++ b/main.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+from graphics import Window
+from maze import Maze
+
+def main():
+ num_rows = 12
+ num_cols = 16
+ margin = 50
+ screen_x = 800
+ screen_y = 600
+ cell_size_x = (screen_x - 2 * margin) / num_cols
+ cell_size_y = (screen_y - 2 * margin) / num_rows
+ win = Window(screen_x, screen_y)
+
+ maze = Maze(margin, margin, num_rows, num_cols, cell_size_x, cell_size_y, win)
+
+ win.wait_for_close()
+
+if __name__ == "__main__":
+ main()