ostrat.prid

package 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

Packages

Package for hex grids.

Package for hex grids.

Attributes

package ostrat.prid.psq

Package for square tile grids.

Package for square tile grids.

Attributes

Type members

Classlikes

object CoordSystem extends HtmlSection

Attributes

Supertypes
trait HtmlSection
trait HtmlUnvoid
trait HtmlElem
trait XmlElemLike
trait XCon
class Object
trait Matchable
class Any
Show all
Self type
object GridGraphic1 extends RectCompound

Attributes

Supertypes
trait RectCompound
trait NoCanvElem
trait RectGraphic
trait CentredElem
trait WithCentre
trait ShapeGraphic
trait BoundedElem
trait GraphicElem
trait GeomElem
class Object
trait Matchable
class Any
Show all
Self type
implicit class GridSlateScaleExtension[T](value: T)(implicit grid: TGrid, evSlate: Slate[T], evScale: Scale[T])

Attributes

Supertypes
class Object
trait Matchable
class Any
trait GridTurnScen

The state of a simultaneous turn tile grid scenario.

The state of a simultaneous turn tile grid scenario.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait HSysTurnScen
trait DLessScen
object DLessScen1
object DLessScen2
trait G1HScen
object G1HScen1
object G1HScen10
object G1HScen2
object G1HScen3
object G1HScen4
object G1HScen7
object G1HScen8
object G1HScen9
trait G2HScen
object G2HScen1
object G2HScen2
object G2HScen3
object G2HScen4
trait BCScen
object BCScen1
object BCScen2
trait CivScen
trait CivScenStart
object Civ1
object Civ2
trait DiscovScen
object DiscovScen1
object DiscovScen2
trait IndRevScen
object IndRevScen1
object IndRevScen2
trait SorsScen
object SorsScen1
trait WW1Scen
object WW1Scen1
object WW1Scen2
trait WW2Scen
object WW2Scen1
object WW2Scen2
trait ZugScen
trait ZugScenStart
object Zug1
object Zug2
object Zug3
trait SqGridScen
trait G1SScen
object G1SScen1
object G1SScen2
object G1SScen3
trait G2SqScen
object G2SScen1
object G2SScen2
object G2SScen3
trait DraughtsScen
object DraughtsStart
trait ChessScen
object ChessStart
Show all
trait LayerTcOpt[A <: AnyRef]

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

Supertypes
class Any
Known subtypes
trait LayerHcOpt[A]
class LayerHcOptGrid[A]
class LayerHcOptRow[A]
class LayerHcOptSys[A]
class SqCenOptLayer[A]
trait LayerTcRef[A <: AnyRef]

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

Supertypes
class Any
Known subtypes
trait LayerHcRef[A]
class LayerHcRefRow[A]
trait LayerHcRefSys[A]
class LayerHcRefGrid[A]
class LayerHcRefMulti[A]
class SqCenLayer[A]
Show all
trait TCen extends TCenOrSep

A tile centre coordinate.

A tile centre coordinate.

Attributes

Supertypes
trait TCenOrSep
trait TCoord
trait TellElemInt2
trait Int2Elem
trait IntNElem
trait ValueNElem
trait SpecialT
trait TellInt2
trait Tell2[Int, Int]
trait Persist2[Int, Int]
trait Tell2Plused[Int, Int]
trait Persist2Plus[Int, Int]
trait Persist1Plus[Int]
trait PersistN
trait TellN
trait Tell
trait Persist
trait Point
class Any
Show all
Known subtypes
class HCen
class SqCen
trait TCenOrSep extends TCoord

Common trait for TCen and TSep. A tile centre or a tile separator coordinate.

Common trait for TCen and TSep. A tile centre or a tile separator coordinate.

Attributes

Supertypes
trait TCoord
trait TellElemInt2
trait Int2Elem
trait IntNElem
trait ValueNElem
trait SpecialT
trait TellInt2
trait Tell2[Int, Int]
trait Persist2[Int, Int]
trait Tell2Plused[Int, Int]
trait Persist2Plus[Int, Int]
trait Persist1Plus[Int]
trait PersistN
trait TellN
trait Tell
trait Persist
trait Point
class Any
Show all
Known subtypes
trait HCenOrSep
class HCen
trait HSep
class HSepA
class HSepB
class HSepC
trait SqCenOrSep
class SqCen
class SqSep
trait TCen
trait TSep
Show all
trait TCoord extends Point, TellElemInt2

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

Supertypes
trait TellElemInt2
trait Int2Elem
trait IntNElem
trait ValueNElem
trait SpecialT
trait TellInt2
trait Tell2[Int, Int]
trait Persist2[Int, Int]
trait Tell2Plused[Int, Int]
trait Persist2Plus[Int, Int]
trait Persist1Plus[Int]
trait PersistN
trait TellN
trait Tell
trait Persist
trait Point
class Any
Show all
Known subtypes
trait HCoord
trait HNotVert
trait HCenOrSep
class HCen
trait HSep
class HSepA
class HSepB
class HSepC
class HCoordOther
trait HVert
class HVertHigh
class HVertLow
trait SqCoord
trait SqCenOrSep
class SqCen
class SqSep
class SqVert
trait TCenOrSep
trait TCen
trait TSep
trait TVert
Show all
trait TGrid extends TGridSys

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

Supertypes
trait TGridSys
trait TCenStruct
class Object
trait Matchable
class Any
Known subtypes
trait TGridMulti extends TGridSys

A tile grid system consisting of multiple tile grids.

A tile grid system consisting of multiple tile grids.

Attributes

Supertypes
trait TGridSys
trait TCenStruct
class Object
trait Matchable
class Any
Known subtypes
trait TGridSys extends TCenStruct

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

Supertypes
trait TCenStruct
class Object
trait Matchable
class Any
Known subtypes
abstract class TGridSysGui(val title: String) extends CmdBarGui

Attributes

Supertypes
trait CmdBarGui
trait CanvasUser
class Object
trait Matchable
class Any
Show all
Known subtypes
class SqSysGui
class G1SGui
class G2SGui
class AltReacGui
class GoGui
trait TSep extends TCenOrSep

A tile separator coordinate.

A tile separator coordinate.

Attributes

Supertypes
trait TCenOrSep
trait TCoord
trait TellElemInt2
trait Int2Elem
trait IntNElem
trait ValueNElem
trait SpecialT
trait TellInt2
trait Tell2[Int, Int]
trait Persist2[Int, Int]
trait Tell2Plused[Int, Int]
trait Persist2Plus[Int, Int]
trait Persist1Plus[Int]
trait PersistN
trait TellN
trait Tell
trait Persist
trait Point
class Any
Show all
Known subtypes
trait HSep
class HSepA
class HSepB
class HSepC
class SqSep
trait TStepLike extends Int1Elem

A tile direction can be used for a tile step.

A tile direction can be used for a tile step.

Attributes

Supertypes
trait Int1Elem
trait IntNElem
trait ValueNElem
trait SpecialT
class Any
Known subtypes
trait HStepLike
trait HStep
object HexDL
object HexDR
object HexLt
object HexRt
object HexUL
object HexUR
object HStepStay
trait SqStepLike
trait SqStep
trait SqStepDiag
object SqDL
object SqDR
object SqUL
object SqUR
trait SqStepPerp
object SqDn
object SqLt
object SqRt
object SqUp
object SqStepStay
trait TStepSided
Show all
trait TStepSided extends TStepLike

A tile direction with a tile side.

A tile direction with a tile side.

Attributes

Supertypes
trait TStepLike
trait Int1Elem
trait IntNElem
trait ValueNElem
trait SpecialT
class Object
trait Matchable
class Any
Show all
Known subtypes
trait HStep
object HexDL
object HexDR
object HexLt
object HexRt
object HexUL
object HexUR
trait SqStepPerp
object SqDn
object SqLt
object SqRt
object SqUp
Show all

Tile system graphical projection.

Tile system graphical projection.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Produces a flat 2D graphical representation of tile grid system.

Produces a flat 2D graphical representation of tile grid system.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait TVert extends TCoord

A tile vertex coordinate.

A tile vertex coordinate.

Attributes

Supertypes
trait TCoord
trait TellElemInt2
trait Int2Elem
trait IntNElem
trait ValueNElem
trait SpecialT
trait TellInt2
trait Tell2[Int, Int]
trait Persist2[Int, Int]
trait Tell2Plused[Int, Int]
trait Persist2Plus[Int, Int]
trait Persist1Plus[Int]
trait PersistN
trait TellN
trait Tell
trait Persist
trait Point
class Any
Show all
object TilingPage extends HtmlPage

Html documentation page for Tiling Module.

Html documentation page for Tiling Module.

Attributes

Supertypes
trait HtmlPage
class Object
trait Matchable
class Any
Self type
TilingPage.type

Implicits

Implicits

final implicit def GridSlateScaleExtension[T](value: T)(implicit grid: TGrid, evSlate: Slate[T], evScale: Scale[T]): GridSlateScaleExtension[T]