aboutsummaryrefslogtreecommitdiff
path: root/src/esieequest/view/text/Console.java
blob: e7a71dd260b412816da979c7f0e084786d81e85e (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
package esieequest.view.text;

import java.util.Scanner;

/**
 * The textual console view.
 * 
 * @author Pacien TRAN-GIRARD
 */
public class Console extends TextInterface {

	/**
	 * Runs the console input scanner.
	 */
	@Override
	protected void run() {
		final Scanner scanner = new Scanner(System.in);
		while (this.running) {
			System.out.print("> ");
			this.gameEngine.interpret(scanner.nextLine());
		}
		scanner.close();
	}

}