Skip to content
No description, website, or topics provided.
Elm
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore
LICENSE
README.md
docs.json
elm.json

README.md

Grid

This package defines 2-dimensional Grids and functions to operate them.

For example, you may want to represent a Go board as a 19x19 grid with Maybe Pieces.

Let's first define pieces.

Type Piece = White | Black

Then we can initialize the board as empty.

initialBoard : Grid (Maybe Piece)
initialBoard =
    Grid.repeat 19 19 empty

Then we can use Grid.get and Grid.set to access and modify the values in grid.

License

This package follows Apache License Version 2.0.

You can’t perform that action at this time.