Cood

ostrat.pGrid.Cood
See theCood companion object
final class Cood(val xi: Int, val yi: Int) extends ShowElemInt2

A Cood represents a 2 dimensional 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 SqGridAlt Cood represents either a tile centre, a tile side or a tile vertex. This is the same for a Hex Grid except that not all values are legal Cood values on a HexGrid. This system allows river and naval units to move along the tile sides. The axis are named xi and yi to distinguish them from the x and y of a Vec2. On a Hex grid there is not a simple 1 to 1 mapping between the Cood components and the Vec2 components.

Attributes

Companion:
object
Graph
Supertypes
trait ElemInt2
trait ElemIntN
trait SpecialT
trait Show2[Int, Int]
trait TypeStr2[Int, Int]
trait TypeStrN
trait ShowN
trait ShowDec
trait Show
trait TypeStr
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def *(operand: Int): Cood
def +(operand: Cood): Cood
def -(operand: Cood): Cood
def /(operand: Int): Cood
def addX(operand: Int): Cood
def addXY(xOff: Int, yOff: Int): Cood
def addY(operand: Int): Cood
def canEqual(a: Any): Boolean
def eqXY(x: Int, y: Int): Boolean
override def equals(that: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Attributes

that

the object to compare against this object for equality.

Returns:

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Any

x.isOdd & y.isOdd | x.isEven & y.isEven

x.isOdd & y.isOdd | x.isEven & y.isEven

Attributes

def fXY[A](f: (Int, Int) => A): A
override def name1: String

1st parameter name.

1st parameter name.

Attributes

Definition Classes
override def name2: String

2nd parameter name.

2nd parameter name.

Attributes

Definition Classes

x.isOdd & y.isEven | x.isEven & y.isOdd

x.isOdd & y.isEven | x.isEven & y.isOdd

Attributes

override def show1: Int

Element 1 of this Show 2 element product.

Element 1 of this Show 2 element product.

Attributes

Definition Classes
override def show2: Int

Element 2 of this Show 2 element product.

Element 2 of this Show 2 element product.

Attributes

Definition Classes
def subX(operand: Int): Cood
def subXY(xOff: Int, yOff: Int): Cood
def subY(operand: Int): Cood
override def typeStr: String

The RSON type of T. This the only data that a ShowT instance requires, that can't be implemented through delegation to an object of type Show.

The RSON type of T. This the only data that a ShowT instance requires, that can't be implemented through delegation to an object of type Show.

Attributes

Definition Classes

Inherited methods

def el1Show(style: ShowStyle, maxPlaces: Int): String

Attributes

Inherited from:
Show2
def el2Show(style: ShowStyle, maxPlaces: Int): String

Attributes

Inherited from:
Show2

A StringArr Arr of the element type names of this Show Product class.

A StringArr Arr of the element type names of this Show Product class.

Attributes

Inherited from:
Show2
final override def int1: Int

Attributes

Definition Classes
Inherited from:
ShowElemInt2
final override def int2: Int

Attributes

Definition Classes
Inherited from:
ShowElemInt2
override def intForeach(f: Int => Unit): Unit

Performs the side effecting function on each Double in this Product element.

Performs the side effecting function on each Double in this Product element.

Attributes

Definition Classes
Inherited from:
ElemInt2
override def numParams: Int

Number of parameter constituents of this class.

Number of parameter constituents of this class.

Attributes

Definition Classes
Inherited from:
TypeStr2
override def opt1: Option[A1]

The optional default value for parameter 1.

The optional default value for parameter 1.

Attributes

Definition Classes
Inherited from:
Show2
override def opt2: Option[A2]

The optional default value for parameter 2.

The optional default value for parameter 2.

Attributes

Definition Classes
Inherited from:
Show2
override def paramNames: StringArr

Sequence of the names of parameter constituents of this class.

Sequence of the names of parameter constituents of this class.

Attributes

Definition Classes
Inherited from:
Show2
override def show(style: ShowStyle): String

Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by showT method on ShowT type class instances.

Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by showT method on ShowT type class instances.

Attributes

Definition Classes
Inherited from:
ShowN
override def showDec(style: ShowStyle, maxPlaces: Int, minPlaces: Int): String

Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by showT method on ShowT type class instances.

Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by showT method on ShowT type class instances.

Attributes

Definition Classes
Inherited from:
ShowN
def showDec(style: ShowStyle, maxPlaces: Int): String

Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by showT method on ShowT type class instances.

Intended to be a multiple parameter comprehensive Show method. Intended to be paralleled by showT method on ShowT type class instances.

Attributes

Inherited from:
Show
def showElemStrDecs(way: ShowStyle, decimalPlaces: Int): StringArr

A StringArr Arr collection of the show methods return values of the elements of this Show Product class.

A StringArr Arr collection of the show methods return values of the elements of this Show Product class.

Attributes

Inherited from:
Show2

Attributes

Inherited from:
ShowN
def showSemisNameDecs(maxPlaces: Int, minPlaces: Int): String

Attributes

Inherited from:
ShowN

A StringArr Arr collection of the show methods return values of the elements of this Show Product class.

A StringArr Arr collection of the show methods return values of the elements of this Show Product class.

Attributes

Inherited from:
ShowN
override def str: String

The most basic Show method, paralleling the strT method on ShowT type class instances.

The most basic Show method, paralleling the strT method on ShowT type class instances.

Attributes

Definition Classes
Inherited from:
Show2

Show with decimal precision of 0 places.

Show with decimal precision of 0 places.

Attributes

Inherited from:
ShowDec

Show with decimal precision of 1 place padding with a zero if necessary.

Show with decimal precision of 1 place padding with a zero if necessary.

Attributes

Inherited from:
ShowDec

Show with decimal precision of 2 places padding with zeros if necessary.

Show with decimal precision of 2 places padding with zeros if necessary.

Attributes

Inherited from:
ShowDec

Show with decimal precision of 3 places padding with zeros if necessary.

Show with decimal precision of 3 places padding with zeros if necessary.

Attributes

Inherited from:
ShowDec
final override def syntaxDepth: Int

Attributes

Definition Classes
Inherited from:
ShowElemInt2
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Show -> Any
Inherited from:
Show

Concrete fields

val xi: Int
val yi: Int

Implicits

Inherited implicits

final implicit override def showT1: ShowT[Int]

The ShowT type class instance for the 1st element of this 2 element product.

The ShowT type class instance for the 1st element of this 2 element product.

Attributes

Definition Classes
Inherited from:
ShowElemInt2
final implicit override def showT2: ShowT[Int]

The ShowT type class instance for the 2nd element of this 2 element product.

The ShowT type class instance for the 2nd element of this 2 element product.

Attributes

Definition Classes
Inherited from:
ShowElemInt2