Exemplo n.º 1
0
 def framestring(self):
     if self.frame == 0:
         return colors.bash("back black") + "    " + colors.bash("end")
     if self.frame == 1:
         return colors.bash("back black") + colors.bash("bright yellow") + "EXIT" + colors.bash("end")
     if self.frame == 2:
         return colors.bash("back bright yellow") + "    " + colors.bash("end")
     if self.frame == 3:
         return colors.bash("back yellow") + "    " + colors.bash("end")
     return colors.bash("back red") + colors.bash("bright red") + "EXIT" + colors.bash("end")
Exemplo n.º 2
0
def main():
    find_exits()

    for i in range(49):
        l = levels[i]
        for e in levels[i].exits:
            if e.frame == 4:
                continue
            info =   "%2d %s %s %d/%d/%d" % (1 + i, e.typestring(), e.framestring(), e.x, e.y, e.z)
            if e.t == 18 and e.x == 45:
                x = levels[l.right()]
                for e2 in x.exits:
                    if e2.z == e.z and e2.y == e.y and e2.x == 1:
                        print(colors.bash("green"), "+", colors.bash("end"), info)
                        break
                else:
                    print(colors.bash("back red"), "-", colors.bash("end"), info)
            elif e.t == 18 and e.x == 1:
                x = levels[l.left()]
                for e2 in x.exits:
                    if e2.z == e.z and e2.y == e.y and e2.x == 45:
                        print(colors.bash("green"), "+", colors.bash("end"), info)
                        break
                else:
                    print(colors.bash("back red"), "-", colors.bash("end"), info)
            elif e.t == 19 and e.z == 45:
                x = levels[l.down()]
                for e2 in x.exits:
                    if e2.x == e.x and e2.y == e.y and e2.z == 1:
                        print(colors.bash("green"), "+", colors.bash("end"), info)
                        break
                else:
                    print(colors.bash("back red"), "-", colors.bash("end"), info)
            elif e.t == 19 and e.z == 1:
                x = levels[l.up()]
                for e2 in x.exits:
                    if e2.x == e.x and e2.y == e.y and e2.z == 45:
                        print(colors.bash("green"), "+", colors.bash("end"), info)
                        break
                else:
                    print(colors.bash("back red"), "-", colors.bash("end"), info)
            else:
                print(colors.bash("yellow"), "?", colors.bash("end"), info)