[bugfix] - avoid create new instance of RobotEngine on every command

This commit is contained in:
Stanislav Nowogrudski 2017-04-21 23:01:58 +02:00
parent 7989a98628
commit 3aaef8b3d3

View File

@ -19,8 +19,9 @@ public class LoopingConsole {
printUsageBanner(); printUsageBanner();
RobotEngine robotEngine = new RobotEngine();
while (true) { while (true) {
RobotEngine robotEngine = new RobotEngine();
System.out.print("> "); System.out.print("> ");
String input = br.readLine(); String input = br.readLine();
robotEngine.commandBot(input); robotEngine.commandBot(input);