Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- # mono_visual.py for mono-type editors
- maze='''
- ∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎
- ∎.p. . . . .∎. . . .∎.x. . . . . . .∎
- ∎. .∎.∎.∎.x.∎. .∎. .∎. .∎.∎.∎.∎.∎. .∎
- ∎. . . . . . . .∎. . . . . . .b.∎. .∎
- ∎.∎.∎. .∎. .∎. .∎. .∎. .∎. .∎. .∎. .∎
- ∎. . . .∎. .∎. .∎. .∎. .∎. . . . .x.∎
- ∎. .∎. .∎. .∎. . . . . .∎.x.∎. .∎.∎.∎
- ∎. .∎.x.∎. .∎.∎.∎. .∎. . . .∎. . . .∎
- ∎. . . . . . . . . .∎.∎.∎. .∎. .∎. .∎
- ∎.∎.∎. .∎.∎.∎.∎.∎. .∎. . . .∎. . . .∎
- ∎. . . .∎. . . .∎. .∎.x.∎.∎.∎.∎.∎. .∎
- ∎. .∎.∎.∎. .∎.x. . . . . . .∎. . . .∎
- ∎. .x. .∎. .∎. .∎.∎.∎.∎.∎. .∎. .∎.∎.∎
- ∎. .∎. . . . . . . . . .∎. . . . . .∎
- ∎. .∎.∎.∎. .∎.∎.∎. .∎. .∎. .∎.∎.∎. .∎
- ∎. . .r. . . . . .x.∎. . . . .g.∎.x.∎
- ∎. .∎.∎.∎. .∎. .∎. .∎. .∎. .∎. .∎. .∎
- ∎. .x. . . .∎. . . . . . . .∎. . . .∎
- ∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎.∎
- '''
- def qrepl(zzz,r):
- for z in r:
- zzz=zzz.replace(z[0],z[1])
- zzz=zzz.split()
- r=[]
- for z in zzz:
- r.append([int(x) if x.isdigit() else x for x in list(z)])
- return r
- fix=[['.',''],[' ','0'],['∎','1'],['x','2']]
- print qrepl(maze,fix)
- print '''
- ╔╦╗
- ╠╬╣
- ╚╩╝
- ╔═╗
- ║║║
- ╚═╝
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement