Skip to content

Commit

Permalink
Create demo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MAN1986 authored Sep 13, 2021
1 parent e9d8b94 commit 3931780
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Demos/demo.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 3931780

Please sign in to comment.