X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=maze.py;h=c2774dd762f398e6a2145838809133f5b8dfb386;hb=68aa86a6645dfef3f919aad5732a1a09db77bfae;hp=f6a852e37241f176a65a7cd69c6c8cb934a3a1fc;hpb=f23843d33a4fa5a38f5034deab8f473793732ee3;p=picoclvr.git diff --git a/maze.py b/maze.py index f6a852e..c2774dd 100755 --- a/maze.py +++ b/maze.py @@ -13,6 +13,8 @@ v_empty, v_wall, v_start, v_goal, v_path = 0, 1, 2, 3, 4 def create_maze(h=11, w=17, nb_walls=8): + assert h % 2 == 1 and w % 2 == 1 + a, k = 0, 0 while k < nb_walls: