diff options
Diffstat (limited to 'src/esieequest/view/Viewable.java')
-rw-r--r-- | src/esieequest/view/Viewable.java | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/esieequest/view/Viewable.java b/src/esieequest/view/Viewable.java new file mode 100644 index 0000000..0d1c9e9 --- /dev/null +++ b/src/esieequest/view/Viewable.java | |||
@@ -0,0 +1,81 @@ | |||
1 | package esieequest.view; | ||
2 | |||
3 | import java.util.HashMap; | ||
4 | |||
5 | import esieequest.controller.GameEngine; | ||
6 | import esieequest.model.events.Quest; | ||
7 | import esieequest.model.items.Item; | ||
8 | import esieequest.model.map.Room; | ||
9 | import esieequest.model.map.Side; | ||
10 | |||
11 | /** | ||
12 | * The view interface that describes an user interface. | ||
13 | * | ||
14 | * @author Pacien TRAN-GIRARD | ||
15 | */ | ||
16 | public interface Viewable { | ||
17 | |||
18 | /** | ||
19 | * Sets the controller to use. | ||
20 | * | ||
21 | * @param gameEngine | ||
22 | * the GameEngine controller | ||
23 | */ | ||
24 | public void setController(GameEngine gameEngine); | ||
25 | |||
26 | /** | ||
27 | * Displays the user interface. | ||
28 | */ | ||
29 | public void show(); | ||
30 | |||
31 | /** | ||
32 | * Enables the user interface. | ||
33 | */ | ||
34 | public void enable(); | ||
35 | |||
36 | /** | ||
37 | * Displays a message. | ||
38 | * | ||
39 | * @param message | ||
40 | * the message | ||
41 | */ | ||
42 | public void echo(String message); | ||
43 | |||
44 | /** | ||
45 | * Disables the user interface. | ||
46 | */ | ||
47 | public void disable(); | ||
48 | |||
49 | /** | ||
50 | * Updates the view to match the current room. | ||
51 | * | ||
52 | * @param room | ||
53 | * the room to display | ||
54 | */ | ||
55 | public void updateRoom(Room room); | ||
56 | |||
57 | /** | ||
58 | * Updates the view to match a side of a room. | ||
59 | * | ||
60 | * @param side | ||
61 | * the side of a room | ||
62 | */ | ||
63 | public void updateSide(Side side); | ||
64 | |||
65 | /** | ||
66 | * Updates the view to match the current quest. | ||
67 | * | ||
68 | * @param quest | ||
69 | * the current quest to display | ||
70 | */ | ||
71 | public void updateQuest(Quest quest); | ||
72 | |||
73 | /** | ||
74 | * Updates the view to display the items contained in the inventory | ||
75 | * | ||
76 | * @param items | ||
77 | * the items | ||
78 | */ | ||
79 | public void updateInventory(HashMap<String, Item> items); | ||
80 | |||
81 | } | ||