aboutsummaryrefslogtreecommitdiff
path: root/src/esieequest/view/Viewable.java
blob: fa53e1a5ff8ca923b22e684a3e9c89199d368313 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package esieequest.view;

import esieequest.controller.GameEngine;
import esieequest.model.events.Quest;
import esieequest.model.events.Scene;
import esieequest.model.items.Inventory;
import esieequest.model.map.Direction;
import esieequest.model.map.Room;
import esieequest.model.map.Side;

/**
 * The view interface that describes an user interface.
 * 
 * @author Pacien TRAN-GIRARD
 */
public interface Viewable {

	/**
	 * Sets the controller to use.
	 * 
	 * @param gameEngine
	 *            the GameEngine controller
	 */
	public void setController(final GameEngine gameEngine);

	/**
	 * Displays the user interface.
	 */
	public void show();

	/**
	 * Enables the user interface.
	 */
	public void enableInput();

	/**
	 * Disables the user interface.
	 */
	public void disableInput();

	/**
	 * Displays a message.
	 * 
	 * @param message
	 *            the message
	 */
	public void echo(final String message);

	/**
	 * Updates the view to match the current quest.
	 * 
	 * @param quest
	 *            the current quest to display
	 */
	public void updateQuest(final Quest quest);

	/**
	 * Updates the view to match the current location.
	 * 
	 * @param room
	 *            the room
	 * @param direction
	 *            the current direction
	 * @param side
	 *            the side of a room
	 */
	public void updateLocation(final Room room, final Direction direction, final Side side,
			final boolean canGoBack);

	/**
	 * Updates the view to display the items contained in the inventory
	 * 
	 * @param items
	 *            the items
	 */
	public void updateInventory(final Inventory inventory);

	/**
	 * Plays the given Scene.
	 * 
	 * @param scene
	 *            the Scene to play
	 */
	public void playScene(final Scene scene);

	/**
	 * Stops the music currently playing.
	 */
	public void stopMusic();

}