def draw_main_cube(block: Tuple[int, int], direction: int): if direction == Direction.standing: Draw.draw_cube(position=block, size=(1, 1, 2)) elif direction == Direction.laying_x: Draw.draw_cube(position=block, size=(2, 1, 1)) elif direction == Direction.laying_y: Draw.draw_cube(position=block, size=(1, 2, 1)) else: Draw.draw_cube(position=block, size=(1, 1, 1))
def draw_secondary_cube(block: Tuple[int, int], direction: int): if direction == Direction.none: Draw.draw_cube(position=block, size=(1, 1, 1), face_color=Draw.colors['light_gray'])
def draw_feature(feature: str, x: int, y: int): if feature == Tile.empty: return first_char = feature[0] if feature == 'ooo' or feature == 'PPP': Draw.draw_cube(position=(x, y), size=(1, 1, -0.2), face_color=Draw.colors['white']) elif feature == 'iii': Draw.draw_cube(position=(x, y), size=(1, 1, -0.2), face_color=Draw.colors['orange']) elif first_char == 's': Draw.draw_cube(position=(x, y), size=(1, 1, -0.2), face_color=Draw.colors['white']) Draw.draw_round_switch(position=(x, y), color=Draw.colors['steel']) elif first_char == 'S': Draw.draw_cube(position=(x, y), size=(1, 1, -0.2), face_color=Draw.colors['white']) Draw.draw_x_switch(position=(x, y), color=Draw.colors['steel']) elif first_char == 'B': Draw.draw_cube(position=(x, y), size=(1, 1, -0.2), face_color=Draw.colors['light_pink']) elif first_char == 'b': Draw.draw_cube(position=(x, y), size=(1, 1, -0.2), face_color=Draw.colors['gray']) elif first_char == 't': if feature[2] == 't': Draw.draw_teleport_switch(position=(x, y), color=Draw.colors['steel']) Draw.draw_cube(position=(x, y), size=(1, 1, -0.2), face_color=Draw.colors['white']) else: Draw.draw_cube(position=(x, y), size=(1, 1, -0.2), face_color=Draw.colors['white'])