`Choose one of the commands: \n1) ${this.robot.tool?"Use the "+this.robot.tool.toolName:"No tools to use!"}\n2) ${this.robot.tool?"Drop the "+this.robot.tool.toolName:"No tools to drop!"}\n3) ${this.robot.tool?"Your tool is "+this.robot.tool.toolName:"Choose one of the tools"}\n4) Exit:\n `
`Choose one of the commands: \n1) ${
this.robot.tool
?"Your tool is "+this.robot.tool.toolName
:"Choose one of the tools"
} \n2) ${
this.robot.tool
?"Drop the "+this.robot.tool.toolName
:"No tools to drop!"
}\n3) ${
this.robot.tool
?"Use the "+this.robot.tool.toolName
:"No tools to use!"
}\n4) Exit:\n `
);
);
switch(answerFromUser){
switch(answerFromUser){
case"1":
case"1":
this.robot.action();
break;
case"2":
this.robot.drop_tool();
break;
case"3":
constanswer=readline.question(
constanswer=readline.question(
"Please, choose one of the tool: \n1) Saw\n2) Hammer\n3) screwdriver\n4) Axe\n5) Drill\n"
"Please, choose one of the tool: \n1) Saw\n2) Hammer\n3) screwdriver\n4) Axe\n5) Drill\n"