small code enhancement

This commit is contained in:
Stanislav Nowogrudski 2017-04-21 23:11:24 +02:00
parent 3fec586c84
commit 3d75934cfc

View File

@ -11,7 +11,11 @@ public class ReportStrategy implements ChangingStrategy {
@Override
public void change(ToyBot toyBot, ToyBotField toyBotField, String command) {
if (command.equals(RobotEngine.REPORT)) {
System.out.println(toyBot);
printReport(toyBot);
}
}
private void printReport(final ToyBot toyBot) {
System.out.println(toyBot);
}
}