def touching

minebender-game@1.0.0.0 · board.bend:55

import minebender-game@1.0.0.0/board.bend as Board
import Base
import minebender-game@1.0.0.0/types.bend as T

55def touching(+p: T.Pos, qs: List<&2, T.Pos>) -> List<&2, T.Pos>:
56  match qs:
57    case Nil{}:
58      Nil{}
59    case +q <> t:
60      List.filter.put(T.Pos, q, touching(p, t), adjacent(p, q))

Uses (4)

Used by (7)