small code enhancement
This commit is contained in:
parent
c36b562fb0
commit
105ee886ad
@ -11,7 +11,11 @@ public class ReportStrategy implements ChangingStrategy {
|
|||||||
@Override
|
@Override
|
||||||
public void change(ToyBot toyBot, ToyBotField toyBotField, String command) {
|
public void change(ToyBot toyBot, ToyBotField toyBotField, String command) {
|
||||||
if (command.equals(RobotEngine.REPORT)) {
|
if (command.equals(RobotEngine.REPORT)) {
|
||||||
|
printReport(toyBot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void printReport(final ToyBot toyBot) {
|
||||||
System.out.println(toyBot);
|
System.out.println(toyBot);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user