Packages

  • package root
    Definition Classes
    root
  • package ostrat

    This is the root package for the Openstrat project.

    This is the root package for the Openstrat project. The top of this package contains, 32 bit Int based Colours, the Multiple type class, a show and persistence library using RCON (Name may change), Rich Compact Object Notation, array based compound value collections of same length elements, an Either based errors framework and general utilities.

    Definition Classes
    root
  • package geom

    I chose the package name to not clash with "geometry" that may be use in other libraries This package contains Basic geometry.

    I chose the package name to not clash with "geometry" that may be use in other libraries This package contains Basic geometry. A number of implementation Value classes of the Int and Double product classes defined in ostrat. 2d graphical objects for generalised use. They are of particular use for the generic canvas based classes defined in pCanv but can be used in any display framework and for printing.

    Definition Classes
    ostrat
  • package pCanv

    The package attempts to encapsulate the various abstract canvas traits while the actual objects that populate a canvas go in package geom.

    The package attempts to encapsulate the various abstract canvas traits while the actual objects that populate a canvas go in package geom.

    Definition Classes
    ostrat
  • package pDev
    Definition Classes
    ostrat
  • package pEarth
    Definition Classes
    ostrat
  • package pExt
    Definition Classes
    ostrat
  • package pGames

    This pSimp contains the a number of games in varying stages of development.

    This pSimp contains the a number of games in varying stages of development.

    Definition Classes
    ostrat
  • package pGrid

    This package works with hexagonal and Square tile grids.

    This package works with hexagonal and Square tile grids. 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.

    Definition Classes
    ostrat
  • BCoodVert
  • BVert
  • BVertDirn
  • ColouredTile
  • Cood
  • CoodLine
  • CoodLines
  • CoodLinesBuff
  • CoodMover
  • Coods
  • CoodsBuff
  • FSSCood
  • GridArr
  • GridElem
  • HCen
  • HCood
  • HCoodVert
  • HDownLeft
  • HDownRight
  • HGrid
  • HGridOff
  • HLeft
  • HRight
  • HSideCood
  • HSides
  • HUpLeft
  • HUpRight
  • HVDnLt
  • HVDnLt1
  • HVDnLt2
  • HVDnRt
  • HVDnRt1
  • HVDnRt2
  • HVDown
  • HVDown1
  • HVDown2
  • HVOffset
  • HVUp
  • HVUp1
  • HVUp2
  • HVUpLt
  • HVUpLt1
  • HVUpLt2
  • HVUpRt
  • HVUpRt1
  • HVUpRt2
  • HVert
  • HVertDirn
  • HVertDirn1
  • HVertDirn2
  • HVertOffs
  • HVertOffsTr
  • HVertReg
  • HVertSingle
  • HexDirn
  • HexGet
  • HexGrid
  • HexGridGui
  • HexGridIrr
  • HexGridReg
  • IntGridImplicit
  • NCood
  • Node
  • OfGridElem
  • OfGridElemReg
  • OfHex
  • OfHexReg
  • OfHexSide
  • OfHexSideReg
  • OfSide
  • OfSideReg
  • OfSquare
  • OfSquareReg
  • OfTile
  • OfTileReg
  • RowMulti
  • SCood
  • SFace
  • SFaceDL
  • SFaceDR
  • SFaceDn
  • SFaceLt
  • SFaceRt
  • SFaceUL
  • SFaceUR
  • SFaceUp
  • SGrid
  • SSCood
  • SSGrid
  • SSGridRange
  • SideBare
  • SqCoodDep
  • SqSqArr
  • SquareGrid
  • SquareGridGui
  • TCoodVert
  • TGrid
  • TVert
  • TVertDirn
  • Tile
  • TileBare
  • TileGrid
  • TileGridGui
  • TileGridReg
  • TileRow
  • TileSide
  • package pParse

    This is the RSON package.

    This is the RSON package. Readable Succinct Object Notation. It could be just as accurately be described as Readable Succinct Data Notation, but that wouldn't scan as well and indicate it as a better replacement for JSON. RSON uses the standard semicolon separated statements combined with multilevel bracket hierarchy syntax familiar from C, C++, Java and JavaScript. Its main innovations over JSON and XML are allowing statements to be partitioned into comma delineated clauses, the empty statement, the empty clause and type inference. It uses a context free operator precedence hierarchy, with the exception of allowing the 4 ( - + ~ !) operator to be used as prefix operators. Beyond this it generally follows Scala syntax where this doesn't conflict with the preceding rules. Unlike Scala statements must finish with a semicolon unless it is the last statement of a file or a bracket block. Allowing statements to end with a newline introduces horrendous ambiguities unless one is willing to go completely down the significant whitespace route and I'm not sure if that could work even work for such a general purpose basic syntax.

    The above allows it to combine a high level of human readability, succinctness, non-programmer / non-expert write-ability, programmer flexibility and composability and fast-parsing. The initial motivating use case was strategy games, which require huge amounts of modable date files. XML and JSON, the current defaults are simply not fit for purpose. RSON aims to break down the walls between game player, game modder, professional game artist, professional game scripter, professional imperative programming wizards in languages such as C / C++ and Rust and professional functional programming wizards in languages such as Scala, Haskell and Idris.

    Definition Classes
    ostrat
  • package pSJs
    Definition Classes
    ostrat
  • package pStrat

    Package for miscellaneous game utilities and data.

    Package for miscellaneous game utilities and data.

    Definition Classes
    ostrat
  • package pWeb

    This package for the manipulation of Html, XML CSS and Javascript.

    This package for the manipulation of Html, XML CSS and Javascript. Some of the functionality could be replaced by Scalatags. As it currently stands the code and design quality of this package is not up to standard, but due to many other higher priorities, I have not been able to take the next step, which is to 1 improve and document it, rewrite it from scratch or 3 replace it with a Scala-tags dependency or some other library.

    Definition Classes
    ostrat
  • package strat
    Definition Classes
    ostrat
p

ostrat

pGrid

package pGrid

This package works with hexagonal and Square tile grids. 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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. pGrid
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class BCoodVert(x: Int, y: Int, vert: BVert) extends HCoodVert with Product with Serializable
  2. trait BVert extends HVert
  3. sealed trait BVertDirn extends HVertDirn with BVert
  4. trait ColouredTile extends Tile with WithColour
  5. final case class Cood(x: Int, y: Int) extends ProdInt2 with Product with Serializable

    A Cood represents an integer coordinate within a tile grid system.

    A Cood represents an integer coordinate within a tile grid system. This has current been implemented for Hexs and Squares, while triangles is the third possible regular tile system. A SqCood represents either a tile centre, a tile side or a tile vertex. This system allows river and naval units to move along the tile sides.

  6. case class CoodLine(x1: Int, y1: Int, x2: Int, y2: Int) extends ProdInt4 with Product with Serializable

    A 2d line defined by its start and end Tile Cood.

  7. final class CoodLines extends AnyVal with ArrProdInt4[CoodLine]

    An Array[Int] based collection for CoodLines.

  8. final class CoodLinesBuff extends AnyVal with ProductI4sBuff[CoodLine, CoodLines]
  9. trait CoodMover extends AnyRef
  10. final class Coods extends AnyVal with ArrProdInt2[Cood]

    An array[Int] based collection for Cood.

  11. final class CoodsBuff extends AnyVal with ProductI2sBuff[Cood, Coods]
  12. trait FSSCood[R] extends (SSCood) => R
  13. trait GridArr[T] extends Any
  14. trait GridElem extends AnyRef

    In a simple Grid the only GridElems are Tiles.

    In a simple Grid the only GridElems are Tiles. In a complex grid, there are values for tiles and tile sides. For programmatic purposes it is vital that GridElem contains its grid coordinates, although at a logical level a tile does not need to know its position within the tile grid. It needs this information so it can communicate with its grid.

  15. final case class HCood(x: Int, y: Int) extends NCood with Product with Serializable

    Hexagonal grid coordinate, assigning values for the tile sides and vertices.

  16. trait HCoodVert extends AnyRef
  17. trait HGrid[TileT] extends TGrid[TileT]
  18. trait HGridOff[TileT] extends HGrid[TileT]
  19. case class HSideCood(x: Int, y: Int) extends Product with Serializable

    I've kept this file because some of the code may be useful

  20. trait HSides[SideT] extends HVertOffsTr
  21. trait HVDnLt extends BVertDirn
  22. case class HVDnLt1(value: Int) extends HVDnLt with HVertDirn1 with Product with Serializable
  23. case class HVDnLt2(ltVal: Int, rtVal: Int) extends HVDnLt with HVertDirn2 with Product with Serializable
  24. trait HVDnRt extends BVertDirn
  25. case class HVDnRt1(value: Int) extends HVDnRt with HVertDirn1 with Product with Serializable
  26. case class HVDnRt2(ltVal: Int, rtVal: Int) extends HVDnRt with HVertDirn2 with Product with Serializable
  27. trait HVDown extends TVertDirn
  28. case class HVDown1(value: Int) extends HVDown with HVertDirn1 with Product with Serializable
  29. case class HVDown2(ltVal: Int, rtVal: Int) extends HVDown with HVertDirn2 with Product with Serializable
  30. final class HVOffset extends AnyVal
  31. trait HVUp extends BVertDirn
  32. case class HVUp1(value: Int) extends HVUp with HVertDirn1 with Product with Serializable
  33. case class HVUp2(ltVal: Int, rtVal: Int) extends HVUp with HVertDirn2 with Product with Serializable
  34. trait HVUpLt extends TVertDirn
  35. case class HVUpLt1(value: Int) extends HVUpLt with HVertDirn1 with Product with Serializable
  36. case class HVUpLt2(ltVal: Int, rtVal: Int) extends HVUpLt with HVertDirn2 with Product with Serializable
  37. trait HVUpRt extends TVertDirn
  38. case class HVUpRt1(value: Int) extends HVUpRt with HVertDirn1 with Product with Serializable
  39. case class HVUpRt2(ltVal: Int, rtVal: Int) extends HVUpRt with HVertDirn2 with Product with Serializable
  40. sealed trait HVert extends AnyRef

    A definition of a Hex Vert with 0, 1 or 2 offset values.

    A definition of a Hex Vert with 0, 1 or 2 offset values. Offsets must be Int 1 <= i >= 4

  41. trait HVertDirn extends HVert
  42. sealed trait HVertDirn1 extends HVertDirn with HVertSingle
  43. trait HVertDirn2 extends HVertDirn
  44. case class HVertOffs(up: TVert = HVertReg, upRt: BVert = HVertReg, dnRt: TVert = HVertReg, down: BVert = HVertReg, dnLt: TVert = HVertReg, upLt: BVert = HVertReg) extends Product with Serializable
  45. trait HVertOffsTr extends AnyRef
  46. trait HVertSingle extends HVert
  47. class HexDirn extends AnyRef
  48. abstract class HexGrid[TileT <: Tile, SideT <: TileSide] extends TileGrid[TileT, SideT]

    A Hex tile own the right sides, upRight, Right and DownRight.

    A Hex tile own the right sides, upRight, Right and DownRight. It owns the Up, UpRight and DownRight Vertices numbers 0, 1 and 2.

  49. abstract class HexGridGui[TileT <: Tile, SideT <: TileSide, GridT <: HexGridReg[TileT, SideT]] extends TileGridGui[TileT, SideT, GridT]

    Class for displaying a single hex grid

  50. abstract class HexGridIrr[TileT <: Tile, SideT <: TileSide] extends HexGrid[TileT, SideT]
  51. class HexGridReg[TileT <: Tile, SideT <: TileSide] extends HexGrid[TileT, SideT] with TileGridReg[TileT, SideT]
  52. implicit class IntGridImplicit extends AnyRef
  53. trait NCood extends AnyRef
  54. case class Node[TileT <: Tile](tile: TileT, gCost: Int, hCost: Int, parent: Opt[Node[TileT]]) extends Product with Serializable
  55. trait OfGridElem[TileT <: Tile, SideT <: TileSide, GridT <: TileGrid[TileT, SideT]] extends AnyRef

    Although including the cood could be considered to break the principle of encapsulation, A tile should not need to know where it is in a grid.

    Although including the cood could be considered to break the principle of encapsulation, A tile should not need to know where it is in a grid. I think it is necessary. Although the cood is determined by its position in the array there is just no good way for this data to be recovered by the Grid for random access. I think also it might be better to change to a var

  56. trait OfGridElemReg[TileT <: Tile, SideT <: TileSide, GridT <: TileGridReg[TileT, SideT]] extends OfGridElem[TileT, SideT, GridT]
  57. trait OfHex[TileT <: Tile, SideT <: TileSide, GridT <: HexGrid[TileT, SideT]] extends OfTile[TileT, SideT, GridT]
  58. case class OfHexReg[TileT <: Tile, SideT <: TileSide, GridT <: HexGridReg[TileT, SideT]](tile: TileT, grid: GridT, gGui: TileGridGui[TileT, SideT, GridT]) extends OfHex[TileT, SideT, GridT] with OfTileReg[TileT, SideT, GridT] with Product with Serializable
  59. trait OfHexSide[TileT <: Tile, SideT <: TileSide, GridT <: HexGrid[TileT, SideT]] extends OfSide[TileT, SideT, GridT]
  60. case class OfHexSideReg[TileT <: Tile, SideT <: TileSide, GridT <: HexGridReg[TileT, SideT]](side: SideT, grid: GridT, gGui: TileGridGui[TileT, SideT, GridT]) extends OfSide[TileT, SideT, GridT] with OfGridElemReg[TileT, SideT, GridT] with Product with Serializable
  61. trait OfSide[TileT <: Tile, SideT <: TileSide, GridT <: TileGrid[TileT, SideT]] extends OfGridElem[TileT, SideT, GridT]
  62. trait OfSideReg[TileT <: Tile, SideT <: TileSide, GridT <: TileGridReg[TileT, SideT]] extends OfSide[TileT, SideT, GridT] with OfGridElemReg[TileT, SideT, GridT]
  63. trait OfSquare[TileT <: Tile, SideT <: TileSide, GridT <: SquareGrid[TileT, SideT]] extends OfTile[TileT, SideT, GridT]
  64. case class OfSquareReg[TileT <: Tile, SideT <: TileSide, GridT <: SquareGrid[TileT, SideT]](tile: TileT, grid: GridT, gGui: TileGridGui[TileT, SideT, GridT]) extends OfSquare[TileT, SideT, GridT] with OfTileReg[TileT, SideT, GridT] with Product with Serializable
  65. trait OfTile[TileT <: Tile, SideT <: TileSide, GridT <: TileGrid[TileT, SideT]] extends OfGridElem[TileT, SideT, GridT]

    I am happy with the fundamental concept behind the OfTile traits, documentation later

  66. trait OfTileReg[TileT <: Tile, SideT <: TileSide, GridT <: TileGridReg[TileT, SideT]] extends OfTile[TileT, SideT, GridT] with OfGridElemReg[TileT, SideT, GridT]
  67. class RowMulti[TileT] extends AnyRef
  68. final case class SCood(x: Int, y: Int) extends NCood with Product with Serializable

    Square Grid coordinate, assigning values for the tile sides and vertices.

  69. sealed class SFace extends AnyRef
  70. trait SGrid[TileT] extends TGrid[TileT]
  71. final case class SSCood(x: Int, y: Int) extends NCood with Product with Serializable

    Simple Square Grid Coordinate.

  72. final class SSGrid[ST] extends AnyVal

    Simple Square Grid

  73. case class SSGridRange(xMax: Int, yMax: Int) extends Product with Serializable
  74. case class SideBare(x: Int, y: Int) extends TileSide with Product with Serializable
  75. final class SqCoodDep extends AnyRef

    I've kept this file because some code might be useful

  76. trait SqSqArr[T] extends GridArr[T]
  77. abstract class SquareGrid[TileT <: Tile, SideT <: TileSide] extends TileGridReg[TileT, SideT]

    This represents a non-Simple square grid where the tile sides can have their own values.

    This represents a non-Simple square grid where the tile sides can have their own values. So for square the classic example is walls. The wall is too thin to occupy a whole tile or a line of tiles. For the time being all square grids are presumed to be regular grids

  78. abstract class SquareGridGui[TileT <: Tile, SideT <: TileSide, GridT <: SquareGrid[TileT, SideT]] extends TileGridGui[TileT, SideT, GridT]

    A Gui for a single regular SquareGridComplex.

    A Gui for a single regular SquareGridComplex. Currently there are no irregular SquareGrids

  79. case class TCoodVert(x: Int, y: Int, vert: TVert) extends HCoodVert with Product with Serializable
  80. trait TGrid[TileT] extends AnyRef
  81. trait TVert extends HVert
  82. sealed trait TVertDirn extends HVertDirn with TVert
  83. trait Tile extends GridElem
  84. case class TileBare(x: Int, y: Int) extends Tile with Product with Serializable
  85. trait TileGrid[TileT <: Tile, SideT <: TileSide] extends AnyRef

    A Tile grid that contains both values for the tiles and the tile boundaries or sides.

    A Tile grid that contains both values for the tiles and the tile boundaries or sides. Rivers, straits, walls, doors, windows ditches and fortifications are examples of values commonly assigned to tile sides.

    A tileGrid is a collection of tiles, either hexs or squares. This is a fundamental trait. It is a specific case of a tiled area. I have reached the conclusion that the general case of completely irregular tiling, while interesting mathematically and useful for say representing a historical game like "Risk", has insufficient utility for the representations we want today. Tile rids can however be fully regular or partly irregular such as the grids for covering the Earth's surface. Grids can be simple just consisting of values for the tiles or complex containing values for the tiles and the tile sides. Rivers, straits, walls, ditches are examples of values commonly assigned to tile sides.

    It is stored in an underlying array. It consists of a sequence of contiguous rows of tiles. Each row of tiles is itself contiguous, There are no breaks between the first tile of the row and the last tile of the row although a row can consist of a single tile. Every row shares at least one tile side with the row above and below. The grid includes all the sides of the tiles including the sides on the outer edges of the grid. This means to link two grids requires a Grid Bridge class.

  86. abstract class TileGridGui[TileT <: Tile, SideT <: TileSide, GridT <: TileGridReg[TileT, SideT]] extends UnfixedMapGui

    Gui for display of a single regular TileGrid

  87. trait TileGridReg[TileT <: Tile, SideT <: TileSide] extends TileGrid[TileT, SideT]

    A regular rectangular tile grid, covering a flat Euclidean 2s surface as opposed to an earth based tile grid or other grid that is not mapping a flat 2d surface.

  88. case class TileRow[T](yRow: Int, xStart: Int, yStart: Int, values: Arr[Multiple[T]]) extends Product with Serializable
  89. trait TileSide extends GridElem

Value Members

  1. val Cood00: Cood
  2. def hSidesHorr(y: Int, xStart: Int, xEnd: Int): Coods

    Gives a Coods Seq of Cood along a horisonatal line

  3. def rectHCoods(xDim: Int, yDim: Int, xOff: Int = 0, yOff: Int = 0): Set[Cood]

    Not sure about this method

  4. object Cood extends Serializable
  5. object CoodLine extends Serializable
  6. object CoodLines extends ProdInt4sCompanion[CoodLine, CoodLines]
  7. object Coods extends ProductI2sCompanion[Cood, Coods]
  8. object HCen extends HexDirn
  9. object HCoodVert
  10. object HDownLeft extends HexDirn
  11. object HDownRight extends HexDirn
  12. object HLeft extends HexDirn
  13. object HRight extends HexDirn
  14. object HUpLeft extends HexDirn
  15. object HUpRight extends HexDirn
  16. object HVertReg extends TVert with BVert with HVertSingle
  17. object HexDirn
  18. object HexGet
  19. object HexGrid
  20. object OfHex
  21. object OfHexReg extends Serializable
  22. object OfHexSideReg extends Serializable
  23. object OfSquareReg extends Serializable
  24. object RowMulti
  25. object SFace
  26. object SFaceDL extends SFace
  27. object SFaceDR extends SFace
  28. object SFaceDn extends SFace
  29. object SFaceLt extends SFace
  30. object SFaceRt extends SFace
  31. object SFaceUL extends SFace
  32. object SFaceUR extends SFace
  33. object SFaceUp extends SFace
  34. object SideBare extends Serializable
  35. object SquareGrid
  36. object TGrid
  37. object TileRow extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped