board.bend fails
raw source on the hub · import 0x3b876eed3a748ea7fba8a7834d3c610b/board.bend as Board
Board: the rules of Minesweeper, written as parallel grid passes. =================================================================
Every rule here is one pass over the whole board. A pass reads the old board and writes a new one, so the four quadrants never race and Bend can fork them onto four cores. The board is Data, so each leaf of a pass holds its own reference to the old board and reads any cell it likes.
Mine layout is the one part that is not obvious. A cell is a mine
when fewer than mines other cells sort before it, under a strict
total order on (hash, index). Exactly mines cells can win that
race, so the count is exact without a shuffle, and each cell decides
on its own with no coordination.
3 imports
import Base import ./grid.bend as G import ./cell.bend as C
The reader could not load this file (at 0x3b876eed3a748ea7fba8a7834d3c610b/board.bend:29). What bend.ts says:
Error:
- expected : a fresh constructor name (duplicate declaration: Lost)
- observed : 'Lost'
Location:
28 | Won{}
29>| Lost{}
| ^^^^
30 |