Skip to content

LesleyLai/elm-grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages