Hallo WarChild,

gute Idee, das mit dem Allroundscan!

Was mir bei dem Prog noch auffällt ist diese Zeile, die eigentlich so gar nicht funktionieren dürfte:
if (direction > index + 1 && index > 2)
Da würde ich unbedingt draus machen:
if ((direction > (index + 1)) && (index > 2))

Das gleiche für die andere if-Zeile.

Gruß Dirk