Cood

final class Cood(val xi: Int, val yi: Int) extends Show2Ints

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 Show2Ints
trait Int2Elem
trait IntNElem
trait SpecialT
trait Show2[Int, Int]
trait Show
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

Inherited from
Show2
Inherited from
Show2
override def int1: Int
Definition Classes
Inherited from
Show2Ints
override def int2: Int
Definition Classes
Inherited from
Show2Ints
override def show(way: Way, maxPlaces: Int, minPlaces: Int): String
Definition Classes
Inherited from
ShowProduct
def shows(way: Way, decimalPlaces: Int): Strings
Inherited from
Show2
override def str: String
Definition Classes
Inherited from
ShowProduct
final override def syntaxdepth: Int
Definition Classes
Inherited from
Show2Ints
final 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: ShowT[Int]
Definition Classes
Inherited from
Show2Ints
final implicit override def showT2: ShowT[Int]
Definition Classes
Inherited from
Show2Ints