def turn
import minebender-game@1.0.0.0/game.bend as Gameimport Base
import minebender-game@1.0.0.0/types.bend as T
438# ps from a point picked by k, wrapping around.
439def turn(+ps: List<&2, T.Pos>, +k: Nat) -> List<&2, T.Pos>:
440 +i = Nat.mod(k, Nat.add(List.length(&2, T.Pos, ps), 1n))
441 List.append(&2, T.Pos, List.drop(&2, T.Pos, ps, i), List.take(&2, T.Pos, ps, i))