class GridPoint: def __init__(self, color, walkable, tilesprite, transparent, visible, discovered, color_overlay, tile_overlay, uisprite): self.color = color self.walkable = walkable self.tilesprite = tilesprite self.transparent = transparent self.visible = visible self.discovered = discovered self.color_overlay = color_overlay self.tile_overlay = tile_overlay self.uisprite = uisprite def __repr__(self): return f"" class Grid: def __init__(self, title, gx, gy, gs, x, y, w, h, visible=False): self.title = title self.grid_x = gx self.grid_y = gy self.grid_size = gs self.x = x self.y = y self.w = w self.h = h self.visible = visible self.points = [] self.entities = [] def at(self, x, y): if not (x > 0 and y > 0 and x < self.grid_x and y < self.grid_y): return None return self.points[y * self.grid_y + x] def __repr__(self): return f"" # CGrid(Grid* _g, int _ti, int _si, int _x, int _y, bool _v) class Entity: def __init__(self, parent, tex_index, sprite_index, x, y, visible=True): self.parent = parent self.tex_index = tex_index self.sprite_index = sprite_index self.x = x self.y = y self.visible = visible def __repr__(self): return f""