Last active
September 28, 2015 03:53
-
-
Save dball/c442a5b266e331002627 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Minesweeper | |
-- row, col | |
Point : Type | |
Point = (Nat, Nat) | |
-- rows, cols, mines (should be a set; should be constrained to rows/columns) | |
Board : Type | |
Board = (Nat, Nat, List Point) | |
-- mine?, mine neighbor count | |
Cell : Type | |
Cell = (Bool, Nat) | |
-- rows of cells, columns of cells (should be vectors of specific length) | |
Projection : Type | |
Projection = List (List Cell) | |
-- record a mine and update its neighbors | |
addMine : Projection -> Point -> Projection | |
-- create an empty projection of the given dimensions | |
emptyProjection : Nat -> Nat -> Projection | |
-- project the board | |
projectBoard : Board -> Projection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment