TGrid
A TileGrid is a description of an abstract TileGrid. It contains no data for the elements of any particular TileGrid. The Data for TileGrids is stored in flat arrays. The TileGrid gives the dimensions of a tileGrid. It has methods to interpret the data in flat Arrays created for that TileGrid specification. It has methods to map the elements of an Array to the the 2 dimensional geometry of the Tile Grid. On its own a TileGrid can produce the outlines of the grid, coordinates vector positions and other pure mathematical data. Combined with a simple function it can for example produce a Chess board. Combined with a 64 length array it can produce a Chess board position. For anything but the most simple games, you will probably want multiple arrays to describe the game state. The terrain for example may remain invariant, so the terrain data does not need to be reproduced with every move.
A TileGrid is for use cases where the proportions of the Grid predetermine the proportions of the visual representation, as opposed to a use case where the proportions of the enclosing space are a factor in determining the proportions of the grid. For example the various grid layouts of the Stars on the American flag.
Attributes
- Graph
- Supertypes
- trait TGridSysclass Any
- Known subtypes
- trait HGridclass HGridIrrclass EGridclass EGridLongclass EGrid160Longclass EGrid160LongPartclass EGrid320Longclass EGrid320LongPartclass EGrid80LongPartclass EGridLongFullclass EGrid160LongFullclass EGrid320LongFullclass EGrid80LongFulltrait EGridLongPartclass HGridRegclass SqGridobject ChessBoard.type