Fix 'move to tile' for new movement (#10887)

This commit is contained in:
Yair Morgenstern 2024-01-07 22:20:52 +02:00 committed by GitHub
parent 87ee874f4b
commit 93f4817729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ import java.util.TreeSet
fun List<UnitMovement.MovementStep>.toBackwardsCompatiblePath(): List<Tile> {
val backwardsCompatiblePath = this.reversed().filter { it.totalCost.movementLeft == 0f || it == this.last() }
val backwardsCompatiblePath = this.filter { it.totalCost.movementLeft == 0f || it == this.last() }
return backwardsCompatiblePath.map { it.tile }
}