blob: dcb4f8f0b201db71c4c7503c534e2012cc426e8d (
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
|
package esieequest.controller.commands;
import esieequest.model.Game;
import esieequest.model.Text;
import esieequest.model.map.Direction;
import esieequest.model.map.Room;
import esieequest.view.Viewable;
/**
* Creates a new game.
*
* @author Pacien TRAN-GIRARD
*/
public class NewCommand implements Executable {
@Override
public void execute(final String argument, final Game game, final Viewable view) {
// TODO: load a new game
game.getPlayer().setCurrentDirection(Direction.NORTH);
game.getPlayer().setCurrentRoom(Room.AMPHITHEATER_SEAT);
view.enable();
view.updateLocation(game.getPlayer().getCurrentRoom(), game.getPlayer().getCurrentDirection(), game.getPlayer().getCurrentSide());
view.echo(Text.WELCOME.getText());
}
}
|