Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # game intro
- print('''
- [-] : Empty positions
- [P] : Player
- [B] : Box
- [S] : Storage point
- ''')
- # create map and first moving
- m = [["-","-","-","-"] ,
- ["-","P","-","-"] ,
- ["-","-","-","-"] ,
- ["-","-","-","-"] ,
- ]
- for i in m :
- for c in i :
- print(c, end = " ")
- print()
- # set location
- x = 0
- y = 0
- P = m[x][y]
- b = input("Your next move? ")
- while b in ["a", "s", "d", "w"] :
- if b == "a" :
- P = m[x][y - 1]
- for i in m :
- for c in i :
- print(c, end = " ")
- print()
- b = input("Your next move? ")
- elif b == "s" :
- P = m[x + 1][y]
- for i in m :
- for c in i :
- print(c, end = " ")
- print()
- b = input("Your next move? ")
- elif b == "d" :
- P = m[x][y + 1]
- for i in m :
- for c in i :
- print(c, end = " ")
- print()
- b = input("Your next move? ")
- else :
- P = m[x - 1][y]
- for i in m :
- for c in i :
- print(c, end = " ")
- print()
- b = input("Your next move? ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement