|
RpgGame
Console Based RPG game in C#
|
Defines the strategy for how an equippable item occupies the player's hands. More...
Public Member Functions | |
| bool | EquipLeft (Player player, IEquippable item) |
| Attempts to equip the specified item into the player's left hand. | |
| bool | EquipRight (Player player, IEquippable item) |
| Attempts to equip the specified item into the player's right hand. | |
Defines the strategy for how an equippable item occupies the player's hands.
The HandOccupation abstraction encapsulates the logic that determines how an item is equipped. Concrete implementations define whether an item occupies one hand or both hands.
This design follows the Strategy Pattern, allowing equipment behavior to vary independently from the Weapon class without relying on type checks or enumerations.
Implementations must define how equipping behaves when targeting the left or right hand.
|
abstract |
Attempts to equip the specified item into the player's left hand.
| player | The player attempting to equip the item. |
| item | The equippable item. |
|
abstract |
Attempts to equip the specified item into the player's right hand.
| player | The player attempting to equip the item. |
| item | The equippable item. |