Game.turn: def of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/game.bend as Game Lines 438-441 of minebender-game@1.0.0.0/game.bend: https://jend.leeeet.dev/read.txt?path=minebender-game@1.0.0.0/game.bend&start_line=438&end_line=441 import Base import minebender-game@1.0.0.0/types.bend as T # ps from a point picked by k, wrapping around. def turn(+ps: List<&2, T.Pos>, +k: Nat) -> List<&2, T.Pos>: +i = Nat.mod(k, Nat.add(List.length(&2, T.Pos, ps), 1n)) List.append(&2, T.Pos, List.drop(&2, T.Pos, ps, i), List.take(&2, T.Pos, ps, i)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.take https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Pos