aboutsummaryrefslogtreecommitdiff
path: root/src/esieequest/game/items/Banana.java
blob: 0c7e7bac83f08ab7662e6f6df804322c58a75793 (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
package esieequest.game.items;

import esieequest.game.Game;
import esieequest.game.states.Quest;
import esieequest.ui.View;

/**
 * A Banana that can be eaten only by Athanase.
 * 
 * @author Pacien TRAN-GIRARD
 * @author Benoit LUBRANO DI SBARAGLIONE
 */
public class Banana extends SimpleItem {

	/**
	 * Instantiates the Emergency Banana.
	 */
	public Banana() {
		super("Emergency Banana");
	}

	@Override
	public void use(final Game game, final View view) {
		if (game.getPlayer().getCurrentQuest() == Quest.FEED_ATHANASE) {
			view.echo("Athanase would eat this!");
		} else {
			view.echo("Better keep it for later...");
		}
	}
}