Add an EOL to the end of the output

This commit is contained in:
Manuel Thalmann 2022-10-11 14:25:59 +02:00
parent 7ffda12287
commit 3c1486854b

View file

@ -7,7 +7,7 @@ public class HanoiServer implements CommandExecutor {
@Override
public String execute(String command) throws Exception {
int count = Integer.parseInt(command);
return moveDisks(count, 'A', 'B', 'C');
return moveDisks(count, 'A', 'B', 'C') + System.lineSeparator();
}
public String moveDisks(int count, char sourcePole, char restPole, char destinationPole) {