Wall

class gamelib.Structures.Wall(**kwargs)

A Wall is a specialized Immovable object that as unmodifiable characteristics:

  • It is not pickable (and cannot be).
  • It is not overlappable (and cannot be).
  • It is not restorable (and cannot be).

As such it’s an object that cannot be moved, cannot be picked up or modified by Player or NPC and block their ways. It is therefor advised to create one per board and reuse it in many places.

Parameters:
  • model (str) – The representation of the Wall on the Board.
  • name (str) – The name of the Wall.
  • size (int) – The size of the Wall. This parameter will probably be deprecated as size is only used for pickable objects.
__init__(**kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(**kwargs) Initialize self.
can_move() Return the capability of moving of an item.
debug_info() Return a string with the list of the attributes and their current value.
display() Print the model WITHOUT carriage return.
overlappable() This represent the capacity for a BoardItem to be overlapped by player or NPC.
pickable() This represent the capacity for a BoardItem to be pick-up by player or NPC.
restorable() This represent the capacity for an Immovable Movable item.
size() Return the size of the Immovable Item.
store_position(row, column) Store the BoardItem position for self access.