LAWS.tile_of: def of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/LAWS.bend as LAWS Lines 598-606 of minebender-game@1.0.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=minebender-game@1.0.0.0/LAWS.bend&start_line=598&end_line=606 import Base import minebender-game@1.0.0.0/types.bend as T # How a cell looks given what the player sees there and their flag. def tile_of(s: T.Seen, flag: Bool) -> T.Tile: match s: case T.Hidden{}: Bool.pick(T.Tile, flag, T.Flagged{}, T.Covered{}) case T.Shown{n}: T.Number{n} case T.Boom{}: T.Blast{} Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Seen https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Tile