|
1 | 1 | package tbooop.model.player.api;
|
2 | 2 |
|
3 | 3 | import tbooop.model.core.api.movable.Entity;
|
4 |
| -import tbooop.model.player.api.coin.PlayerCoin; |
5 |
| -import tbooop.model.player.api.key.PlayerKey; |
6 | 4 | import tbooop.commons.api.CardinalDirection;
|
7 | 5 | import tbooop.commons.api.Vector2d;
|
8 | 6 |
|
|
11 | 9 | * a player can interact with an enemy trying to kill him or can collect
|
12 | 10 | * objects on the map.
|
13 | 11 | */
|
14 |
| -public interface Player extends Entity, UnmodifiablePlayer, PlayerKey, PlayerCoin { |
| 12 | +public interface Player extends Entity, UnmodifiablePlayer { |
15 | 13 |
|
16 | 14 | /**
|
17 | 15 | * Set the current health equals to the max health.
|
@@ -59,4 +57,35 @@ public interface Player extends Entity, UnmodifiablePlayer, PlayerKey, PlayerCoi
|
59 | 57 | * @param amount the amount to increase;
|
60 | 58 | */
|
61 | 59 | void increaseMaxHealth(int amount);
|
| 60 | + |
| 61 | + /** |
| 62 | + * Adds the specified number of coins to the collection. |
| 63 | + * |
| 64 | + * @param coins the number of coins to add |
| 65 | + */ |
| 66 | + void addCoins(int coins); |
| 67 | + |
| 68 | + /** |
| 69 | + * Consumes the specified number of coins from the collection. |
| 70 | + * |
| 71 | + * @param coins the number of coins to consume |
| 72 | + */ |
| 73 | + void consumeCoins(int coins); |
| 74 | + |
| 75 | + /** |
| 76 | + * Indicates whether the collection has a key. |
| 77 | + * |
| 78 | + * @return true if the collection has a key, otherwise false |
| 79 | + */ |
| 80 | + boolean hasKey(); |
| 81 | + |
| 82 | + /** |
| 83 | + * Decrement the number of key to the collection by 1. |
| 84 | + */ |
| 85 | + void useKey(); |
| 86 | + |
| 87 | + /** |
| 88 | + * Increment the number of key to the collection by 1. |
| 89 | + */ |
| 90 | + void pickupKey(); |
62 | 91 | }
|
0 commit comments