Cood

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 SqGrid 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.

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

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 base32: String
def canEqual(a: Any): Boolean
def eqXY(x: Int, y: Int): Boolean
override def equals(that: Any): Boolean
Definition Classes
Any
def evenSum: Boolean

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

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

def fXY[A](f: (Int, Int) => A): A
override def name1: String
Definition Classes
override def name2: String
Definition Classes
def oddSum: Boolean

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

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

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

Inherited methods

def el1Show(style: ShowStyle, maxPlaces: Int): String
Inherited from:
Show2
def el2Show(style: ShowStyle, maxPlaces: Int): String
Inherited from:
Show2
Inherited from:
Show2
Inherited from:
Show2
final override def int1: Int
Definition Classes
Inherited from:
ShowElemInt2
final override def int2: Int
Definition Classes
Inherited from:
ShowElemInt2
override def opt1: Option[Int]

The optional default value for parameter 1.

The optional default value for parameter 1.

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

The optional default value for parameter 2.

The optional default value for parameter 2.

Definition Classes
Inherited from:
Show2
override def show(style: ShowStyle): String
Definition Classes
Inherited from:
ShowDec
override def showDec(style: ShowStyle, maxPlaces: Int, minPlaces: Int): String
Definition Classes
Inherited from:
ShowProductDec
def showDec(style: ShowStyle, maxPlaces: Int): String

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

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

Inherited from:
ShowDec
def showElemStrDecs(way: ShowStyle, decimalPlaces: Int): Strings
Inherited from:
Show2
override def showElemStrs(way: ShowStyle): Strings
Definition Classes
Inherited from:
ShowProductDec
def showSemisNameDecs(maxPlaces: Int, minPlaces: Int): String
Inherited from:
ShowProductDec
def showSemisNames: String
Inherited from:
ShowProduct
override def str: String
Definition Classes
Inherited from:
ShowDec
def str0: String

Show with decimal precision of 0 places.

Show with decimal precision of 0 places.

Inherited from:
ShowDec
def str1: String

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.

Inherited from:
ShowDec
def str2: String

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

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

Inherited from:
ShowDec
def str3: String

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

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

Inherited from:
ShowDec
final override def syntaxDepth: Int
Definition Classes
Inherited from:
ShowElemInt2
override def toString: String
Definition Classes
Show -> Any
Inherited from:
Show

Concrete fields

val xi: Int
val yi: Int

Implicits

Inherited implicits

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