trait Space[D <: Direction, L <: Location] extends AnyRef
A space of arbitrary dimensionality.
Examples:
- 1D: Row, Column, List, ...
- 2D: Square grid, hexagonal grid, ...
- 3D: Quantized space (Made up of discrete locations, ie: Not continuous)
- Alphabetic
- By Inheritance
- Space
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
adjacentTo(location: L): List[(D, L)]
Returns a list of tuples where each tuple corresponds to a unique location adjacent to the provided location.
Returns a list of tuples where each tuple corresponds to a unique location adjacent to the provided location.
(1) The direction of the adjacent location with respect to the provided location, and
(2) a reference to the adjacent location.
- location
Some location in a Space
- returns
The list of adjacent locations.
-
abstract
def
inDirection(location: L, direction: D): Option[L]
Returns the location adjacent to the specified location in the specified direction if it exists, otherwise None.
Returns the location adjacent to the specified location in the specified direction if it exists, otherwise None.
- location
A location
- direction
A direction
- returns
Some(adjacent-location) or None
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )