From 3931780dc6183d2e6cb81f2fe1e6987e0ede29a9 Mon Sep 17 00:00:00 2001 From: Muhammad Ahsan Naeem Date: Mon, 13 Sep 2021 17:18:49 +0500 Subject: [PATCH] Create demo.py --- Demos/demo.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Demos/demo.py diff --git a/Demos/demo.py b/Demos/demo.py new file mode 100644 index 0000000..f0b0cfc --- /dev/null +++ b/Demos/demo.py @@ -0,0 +1,31 @@ +from pyamaze import maze,COLOR,agent +m=maze() +# m=maze(20,30) +# m.CreateMaze() +# m.CreateMaze(5,5,pattern='v',theme=COLOR.light) +m.CreateMaze(loopPercent=100) + +# a=agent(m,5,4) +# print(a.x) +# print(a.y) +# print(a.position) + + +a=agent(m,footprints=True,filled=True) +b=agent(m,5,5,footprints=True,color='red') +c=agent(m,4,1,footprints=True,color='green',shape='arrow') + +# m.enableArrowKey(a) +# m.enableWASD(b) + +path2=[(5,4),(5,3),(4,3),(3,3),(3,4),(4,4)] +path3='WWNNES' + +# l1=textLabel(m,'Total Cells',m.rows*m.cols) +# l1=textLabel(m,'Total Cells',m.rows*m.cols) +# l1=textLabel(m,'Total Cells',m.rows*m.cols) +# l1=textLabel(m,'Total Cells',m.rows*m.cols) + +m.tracePath({a:m.path,b:path2,c:path3},delay=200,kill=True) + +m.run()