ostrat.prid
The tile grid package, replacing the old pGrid package. This package works with hexagonal and Square tile grids. There are separate class for the different types of Coordinates HCen, SqCen, HSide, etc. The tile objects themselves will not in the general case the contain grid coordinates, although it may be necessary to include this data for complex tile values interacting with their wider environment. Its fundamental components are the grid data itself. This is just a linear array of tile data. Compile-time typed grid data. So for example a chess board can be represented by a 64 element Arr, its context determines that it is to be interpreted as an 8 by 8 square grid. Grid descriptions that describe the grid representation in the Array and GridFunctions which implement Cood to T. The grid and grid-gui hierarchies currently contain a mix of new and old systems.
The package name prid, short for package grid, was chosen to allow you to use the name "grid" in your code.
Attributes
Members list
Type members
Classlikes
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
The state of a simultaneous turn tile grid scenario.
The state of a simultaneous turn tile grid scenario.
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- trait HSysTurnScentrait DLessScenobject DLessScen1.typeobject DLessScen2.typetrait H1Scenobject G1HScen1.typeobject G1HScen10.typeobject G1HScen2.typeobject G1HScen3.typeobject G1HScen4.typeobject G1HScen7.typeobject G1HScen8.typeobject G1HScen9.typetrait G2HScenobject G2HScen1.typeobject G2HScen2.typeobject G2HScen3.typeobject G2HScen4.typetrait BCScenobject BCScen1.typeobject BCScen2.typetrait CivScentrait CivScenStartobject Civ1.typeobject Civ2.typetrait NapScenobject NapScen1.typeobject NapScen2.typetrait WW1Scenobject WW1Scen1.typeobject WW1Scen2.typetrait WW2Scenobject WW2Scen1.typeobject WW2Scen2.typetrait ZugScentrait ZugScenStartobject Zug1.typeobject Zug2.typeobject Zug3.typetrait SqGridScentrait G1SqScentrait G1SqScenStartobject G1S1Scen1.typeobject G1S1Scen2.typetrait ChessLikeScentrait ChessScenobject ChessStart.typetrait DraughtsScenobject DraughtsStart.type
A tile centre coordinate.
A tile centre coordinate.
Attributes
- Graph
- Supertypes
- Known subtypes
An Array of tile centre data of type A. An appropriate SqGrid or HGrid is required to utilise its functionality.
An Array of tile centre data of type A. An appropriate SqGrid or HGrid is required to utilise its functionality.
Attributes
- Graph
- Supertypes
- Known subtypes
- class HCenLayer[A]class SqCenLayer[A]
An efficient immutable array of optional values mapped to a TGridSys tile grid.
An efficient immutable array of optional values mapped to a TGridSys tile grid.
Attributes
- Graph
- Supertypes
- class Any
- Known subtypes
- class HCenOptLayer[A]class SqCenOptLayer[A]
A tile centre or a tile side coordinate.
A tile centre or a tile side coordinate.
Attributes
- Graph
- Supertypes
- Known subtypes
A coordinate in a tile grid TGrid. The row is the first field, the column is the second.
A coordinate in a tile grid TGrid. The row is the first field, the column is the second.
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- trait TCenOrSidetrait TCenclass HCenclass SqCentrait TSideclass HSideclass SqSidetrait HCenOrSidetrait SqCenOrSidetrait TVerttrait HCoordtrait HNotVertclass HCoordOtherclass HVerttrait SqCoordclass SqVert
Companion object for TCoord trait will contain a Show[TCoord] implicit instance in Scala 3, but this produces an error in 2.13.5.
A tile direction can be used for a tile step.
A tile direction can be used for a tile step.
Attributes
- Graph
- Supertypes
- Known subtypes
- trait TDirnSidedtrait HStepobject HStepUL.typeobject HexDL.typeobject HexDR.typeobject HexLt.typeobject HexRt.typeobject HexUR.typetrait SqDirnPerpobject SqDn.typeobject SqLt.typeobject SqRt.typeobject SqUp.typetrait SqDirntrait SqDirnDiagobject SqDL.typeobject SqDR.typeobject SqUL.typeobject SqUR.type
A tile direction with a tile side.
A tile direction with a tile side.
Attributes
- Graph
- Supertypes
- trait TDirntrait Int1Elemtrait IntNElemtrait ValueNElemtrait SpecialTclass Objecttrait Matchableclass Any
- Known subtypes
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 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
A tile grid system consisting of multiple tile grids.
A tile grid system consisting of multiple tile grids.
Attributes
- Graph
- Supertypes
- Known subtypes
- trait HGridMultitrait EGridMultitrait EGridLongMultitrait EGrid160LongMultiobject Grids160S0E1.typeobject Grids160S11E1.typeobject Grids160S4E5.typetrait EGrid320LongMultiobject Grids320ChinaJapan.typeobject Grids320S0E1.typeobject Grids320S0E11.typeobject Grids320S10E5.typeobject Grids320S11E2.typeobject Grids320S8E10.typeobject GridsNCanada.typetrait EGrid80LongMultiobject Grids80s0e1.typetrait SqGridMulticlass SqGridStackclass SqGridsAdjPair
A system of tile grids. Can be a single tile grid or a system of multiple tile grids.
A system of tile grids. Can be a single tile grid or a system of multiple tile grids.
Attributes
- Graph
- Supertypes
- class Any
- Known subtypes
- trait TGridtrait HGridclass HGridIrrclass EGridclass EGridLongclass EGrid160Longclass EGrid160LongPartclass EGrid320Longclass EGrid320LongPartclass EGrid80LongPartclass EGridLongFullclass EGrid160LongFullclass EGrid320LongFullclass EGrid80LongFulltrait EGridLongPartclass HGridRegclass SqGridobject ChessBoard.typetrait TGridMultitrait HGridMultitrait EGridMultitrait EGridLongMultitrait EGrid160LongMultiobject Grids160S0E1.typeobject Grids160S11E1.typeobject Grids160S4E5.typetrait EGrid320LongMultiobject Grids320ChinaJapan.typeobject Grids320S0E1.typeobject Grids320S0E11.typeobject Grids320S10E5.typeobject Grids320S11E2.typeobject Grids320S8E10.typeobject GridsNCanada.typetrait EGrid80LongMultiobject Grids80s0e1.typetrait SqGridMulticlass SqGridStackclass SqGridsAdjPairtrait HGridSystrait EGridSystrait EGrid160Systrait EGrid320Systrait EGrid80Systrait SqGridSys
Attributes
- Graph
- Supertypes
- Known subtypes
A tile side coordinate.
A tile side coordinate.
Attributes
- Graph
- Supertypes
- Known subtypes
Tile system graphical projection.
Tile system graphical projection.
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- trait TSysProjectionFlatclass HSysProjectionFlatclass SqSysProjectionFlattrait HSysProjectionclass HSysProjectionEarthtrait SqSysProjection
Attributes
- Graph
- Supertypes
- Known subtypes
- class HSysProjectionFlatclass SqSysProjectionFlat
A tile vertex coordinate.