1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
NOWALL = 0x0e WALL = 0x01 WALL_NO_VISIT = 0x01 WALL_VISIT = 0x03 STEEL = 0X05
CELL = 0x10 CELL_NO_VISIT = 0x10 CELL_VISIT = 0x30 CELL_VISIT_FLAG = 0X20 STAIRS_U = 0x40 STAIRS_D = 0x80 STAIRS_UD = 0xC0 CELL_EXT_FLAG = 0X100 CELL_EXT = 0X110
LR = 1 FB = 2 UD = 3
LEFT = 'L' RIGHT = 'R' FORWARD = 'F' BACKWARD='B' UP = 'U' DOWN = 'D'
class Grid: def __new__(cls, *args, **kwargs): return super().__new__(cls)
def __init__(self, x, y, z): self.x = x self.y = y self.z = z self.u = 0 self.d = 0 self.l = 0 self.r = 0 self.f = 0 self.b = 0
def __str__(self): return "x={},y={},z={}".format(self.name, self.age, self.sex) def __del__(self): return
|