Direction

enum Direction : Enum<Direction>

A collection of constants representing directions

Entries

NORTH_WEST
Link copied to clipboard
NORTH_WEST(Coordinate2D(-1, 1))
NORTH
Link copied to clipboard
NORTH(Coordinate2D(0, 1))
NORTH_EAST
Link copied to clipboard
NORTH_EAST(Coordinate2D(1, 1))
EAST
Link copied to clipboard
EAST(Coordinate2D(1, 0))
SOUTH_EAST
Link copied to clipboard
SOUTH_EAST(Coordinate2D(1, -1))
SOUTH
Link copied to clipboard
SOUTH(Coordinate2D(0, -1))
SOUTH_WEST
Link copied to clipboard
SOUTH_WEST(Coordinate2D(-1, -1))
WEST
Link copied to clipboard
WEST(Coordinate2D(-1, 0))

Functions

compareTo
Link copied to clipboard
operator override fun compareTo(other: Direction): Int
equals
Link copied to clipboard
operator override fun equals(other: Any?): Boolean
finalize
Link copied to clipboard
fun finalize()
getDeclaringClass
Link copied to clipboard
fun getDeclaringClass(): Class<Direction>
hashCode
Link copied to clipboard
override fun hashCode(): Int
rotate
Link copied to clipboard
abstract fun rotate(dx: Int, dy: Int): Coordinate2D
toString
Link copied to clipboard
open override fun toString(): String

Properties

coordinate
Link copied to clipboard
val coordinate: Coordinate2D
the vector corresponding to each direction
name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int