Skip to content

ajjaic/ameda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manipulate 2D grid indices on an unwrapped 2D grid.

While trying to implement the game of life, I noticed that a lot of logic related to manipulating the grid is not specific to "Game of Life" itself. So that part of the logic for index calculation of the grid has been abstracted into a separate library. The result is Ameda.

Amega helps to answer questions like

  • What are the left/right/top/bottom most cells of a grid?
  • What are the neighbors of a specific cell in the grid.
  • Which cells have all 8 neighbors in the grid? (Cos some have only 3 neighbors and some only 5)
  • What are the indices of the 4 corners of the grid.

Limitations

  • Currently, the minimum and maximum grid size is 2x2 to 511x511 respectively.
  • Higher grid sizes can be used. But 511x511 is what the library is tested with.

About

Manipulate 2D grids

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages