aboutsummaryrefslogtreecommitdiff
path: root/src/esieequest/controller/commands/TalkCommand.java
blob: 39c49322adf059f904b131041e3056d5fe988e55 (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
package esieequest.controller.commands;

import esieequest.model.Game;
import esieequest.model.Text;
import esieequest.view.Viewable;

/**
 * Allows the Player to TALK to a Character.
 * 
 * @author Pacien TRAN-GIRARD
 */
public class TalkCommand implements Executable {

	@Override
	public void execute(final String argument, final Game game, final Viewable view) {

		if (!game.getPlayer().getCurrentSide().hasCharacter()) {
			view.echo(Text.NO_CHARACTER.toString());
			return;
		}

		game.getPlayer().getCurrentSide().getCharacter().talk(game, view);

	}

}