aboutsummaryrefslogtreecommitdiff
path: root/src/esieequest/view/text/Console.java
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2014-03-15 20:04:47 +0100
committerPacien TRAN-GIRARD2014-03-15 20:04:47 +0100
commit967f40d710eb07568b6753c6f02d6897f8728999 (patch)
tree05a2e255261185806e142d97355e0aff85c83b39 /src/esieequest/view/text/Console.java
parent48b29ade0ae071401e3c4c69f70506088f28adaa (diff)
downloadesieequest-967f40d710eb07568b6753c6f02d6897f8728999.tar.gz
Implement command input from file
Diffstat (limited to 'src/esieequest/view/text/Console.java')
-rw-r--r--src/esieequest/view/text/Console.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/esieequest/view/text/Console.java b/src/esieequest/view/text/Console.java
new file mode 100644
index 0000000..e7a71dd
--- /dev/null
+++ b/src/esieequest/view/text/Console.java
@@ -0,0 +1,25 @@
1package esieequest.view.text;
2
3import java.util.Scanner;
4
5/**
6 * The textual console view.
7 *
8 * @author Pacien TRAN-GIRARD
9 */
10public class Console extends TextInterface {
11
12 /**
13 * Runs the console input scanner.
14 */
15 @Override
16 protected void run() {
17 final Scanner scanner = new Scanner(System.in);
18 while (this.running) {
19 System.out.print("> ");
20 this.gameEngine.interpret(scanner.nextLine());
21 }
22 scanner.close();
23 }
24
25}