pygamelib.board_items.BoardItemComplexComponent

class pygamelib.board_items.BoardItemComplexComponent(**kwargs)

The default component of a complex item.

It is literrally just a BoardItem but is subclassed for easier identification.

It is however scanning its parent for the item’s basic properties (overlappable, restorable, etc.)

A component can never be pickable by itself.

__init__(**kwargs)

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

Methods

__init__(**kwargs) Initialize self.
can_move() Returns True if the item can move, False otherwise.
collides_with(other) Tells if this item collides with another item.
column Convenience method to get the current stored column of the item.
debug_info() Return a string with the list of the attributes and their current value.
display() Print the model WITHOUT carriage return.
distance_to(other) Calculates the distance with an item.
height Convenience method to get the height of the item.
inventory_space() This is a virtual method that must be implemented in deriving class.
overlappable() Returns True if the item is overlappable, False otherwise.
pickable() Returns True if the item is pickable, False otherwise.
position_as_vector() Returns the current item position as a Vector2D
restorable() Returns True if the item is restorable, False otherwise.
row Convenience method to get the current stored row of the item.
store_position(row, column) Store the BoardItem position for self access.
width Convenience method to get the width of the item.