A Door is a
GenericStructurethat is not pickable, overlappable and restorable. It has a value of 0 and a size of 1 by default. It is an helper class that allows to focus on game design and mechanics instead of small building blocks.
- model (str) – The model that will represent the door on the map
- value (int) – The value of the door, it is useless in that case. The default value is 0.
- size (str) – The size of the door. Unless you make the door pickable (I have no idea why you would do that…), this parameter is not used.
- type (str) – The type of the door. It is often used as a type identifier for your game main loop. For example: unlocked_door or locked_door.
- pickable (Boolean) – Is this door pickable by the player? Default value is False.
- overlappable (Boolean) – Is this door overlappable by the player? Default value is True.
- restorable (Boolean) – Is this door restorable after being overlapped? Default value is True.
All the options from
GenericStructureare also available to this constructor.
door1 = Door(model=Sprites.DOOR,type='locked_door')
Initialize self. See help(type(self)) for accurate signature.
Return the capability of moving of an item.
Return a string with the list of the attributes and their current value.
Print the model WITHOUT carriage return.
This represent the capacity for a
BoardItemto be overlapped by player or NPC.
This represent the capacity for a BoardItem to be picked-up by player or NPC.
This represent the capacity for an
BoardItem(in this case a GenericStructure item) to be restored by the board if the item is overlappable and has been overlapped by another
Make the structure overlappable or not.
Make the structure pickable or not.
Make the structure restorable or not.
Return the size of the Immovable Item.
Store the BoardItem position for self access.