def flood_open
minebender-game@1.0.0.0 · game.bend:264
import minebender-game@1.0.0.0/game.bend as Game
import Base
import minebender-game@1.0.0.0/types.bend as T
import minebender-game@1.0.0.0/board.bend as B
264def flood_open(g: Game, +p: T.Pos) -> Game:
265 match g:
266 case Game{+w, +h, +layout, +shown, flags, status}:
267 +start = {[Work{p, Nil{}}] : List<&2, Work>}
268 +sh = flood(B.count_false(shown), start, head_hidden(w, h, shown, start), w, h, layout, shown)
269 Game{w, h, layout, sh, flags, won_or_playing(all_safe(w, h, layout, sh))}