diff --git a/extra/minesweeper/minesweeper.factor b/extra/minesweeper/minesweeper.factor index 960a6baf35..eb96279e4a 100644 --- a/extra/minesweeper/minesweeper.factor +++ b/extra/minesweeper/minesweeper.factor @@ -53,7 +53,7 @@ TUPLE: cell #adjacent mined? state ; : adjacent-mines ( cells row col -- #mines ) [ mined?>> ] count-neighbors ; -: adjacent-flags ( cells row col -- #mines ) +: adjacent-flags ( cells row col -- #flags ) [ state>> +flagged+ = ] count-neighbors ; :: each-cell ( ... cells quot: ( ... row col cell -- ... ) -- ... )