
Zitat von
Flips:
... und den Abstand via Pythagoras berechne
Ich glaube nicht, dass das in deinem Fall die richtige Rechenmethode ist.
Code:
o o o o o o o o
o o o o o o o o
o o o x o o o o
o o o o o o y o
o o o o o o o o
o o o o o o o o
o o o o o o o o
o o o o o o o o
Wie gross ist hier der "Abstand" von x nach y?
Ein Kästchen nach Süden und drei nach Osten macht 4.
Die Reihenfolge der Züge ist egal, es sind immer mindestens 4 Züge notwendig.
Oder wenn eine diagonale Bewegung erlaubt ist:
Diagonal nach Süd-Ost plus zwei nach Osten macht 3.