Return to repo list

heart-of-gold

Tactical RPG written in python, using pygame.
Return to HMagellan.com

commit bcb15af4e2f62d6847f04a3af19b1995e72332bf
parent 627504e726f678a4e7ec3631d93c53f431cd8403
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Sat, 12 Sep 2020 14:52:20 -0500

Removed unneeded tile vgo subclass

Diffstat:
Msrc/vgo.py | 42+++++-------------------------------------
1 file changed, 5 insertions(+), 37 deletions(-)

diff --git a/src/vgo.py b/src/vgo.py @@ -7,13 +7,13 @@ from .constants import ENTITY_JSON_PATH ########## # This file contains: -# 1. The VisibleGameObject class that defines the abstract parent of all entities, tiles, and other visible sprites -# 2. The Entity class that defines the objects that represent non-tile, non-UI-element game objects +# 1. The VisibleGameObject class that defines the abstract parent of all entities and other visible sprites +# 2. The Entity class that defines the objects that represent non-UI-element game objects # 3. Various kinds of specialized entity classes -# 4. The Tile class that defines the objects that make up the game board -# 5. Managers for VGO objects +# 4. Managers for VGO objects # TODO: This should eventually use LayeredDirty sprites for performance reasons +# TODO: Eventually need to add a UI-element class type (sub of entity? Should entity replace VGO entirely???) ################################### # Section 1 - Visible Game Object # @@ -116,40 +116,8 @@ class Entity(VisibleGameObject): # Section 3 - Various Entity subclasses # ######################################### -########################## -# Section 4 - Tile Class # -########################## - -class Tile(VisibleGameObject): - """ - Tile is a class for the tile objects that make up the visible game - board. Tiles are drawn in a grid, managed by a BoardManager object, - are part of a Board, and can be either passable or impassable, and - occupied by 0 or more Entity objects. Tiles have adjacent Tiles - they need to be aware of, but they are supplied with these adjacents - by the Board. - """ - - def __init__(self, sheet, position, visible = True, board = None, gridpos = (0, 0), passable = True): - - # Parent initialization - super().__init__(sheet, position, visible) - - # Saved values - self.board = board - self.grid_position = gridpos - self.passable = passable - - # Adjacents - self.adjacents = { - "left": None, - "right": None, - "top": None, - "bottom": None - } - ############################################## -# Section 5 - Managers for VGOs & Subclasses # +# Section 4 - Managers for VGOs & Subclasses # ############################################## class EntityManager(manager.Manager):