Class

com.rayrobdod.boardGame

StrictRectangularSpaceViaFutures

Related Doc: package boardGame

Permalink

final class StrictRectangularSpaceViaFutures[A] extends StrictRectangularSpace[A]

A StrictRectangularSpace where the values of left, right, up and down are lazily evaluated from scala.Function0s

A

the type of spaceclass used by this class

Source
RectangularSpace.scala
Linear Supertypes
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. StrictRectangularSpaceViaFutures
  2. StrictRectangularSpace
  3. RectangularSpace
  4. Space
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StrictRectangularSpaceViaFutures(typeOfSpace: A, leftFuture: () ⇒ Option[StrictRectangularSpace[A]], upFuture: () ⇒ Option[StrictRectangularSpace[A]], rightFuture: () ⇒ Option[StrictRectangularSpace[A]], downFuture: () ⇒ Option[StrictRectangularSpace[A]])

    Permalink

    leftFuture

    A function that is called to determine the result of the left method

    upFuture

    A function that is called to determine the result of the up method

    rightFuture

    A function that is called to determine the result of the right method

    downFuture

    A function that is called to determine the result of the down method

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def adjacentSpaces: Set[_ <: StrictRectangularSpace[A]]

    Permalink

    the union of this.left, this.up, this.right, this.down

    the union of this.left, this.up, this.right, this.down

    Definition Classes
    StrictRectangularSpaceRectangularSpaceSpace
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def distanceTo(other: Space[A], costFunction: CostFunction[A]): Int

    Permalink

    Finds the distance between this Space and another Space.

    Finds the distance between this Space and another Space. This is Dijkstra's algorithm, as the spaces aren't allowed to know where they are in relation they are to each other.

    other

    the space to find the movementCost required to get to

    costFunction

    A function that defines the 'cost' of moving from the first space to the second space

    returns

    the movementCost required to get from this space to other

    Definition Classes
    Space
  8. lazy val down: Option[StrictRectangularSpace[A]]

    Permalink

    The space that is located to the down of this space, whatever 'down' means

    The space that is located to the down of this space, whatever 'down' means

    Definition Classes
    StrictRectangularSpaceViaFuturesStrictRectangularSpaceRectangularSpace
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. lazy val left: Option[StrictRectangularSpace[A]]

    Permalink

    The space that is located to the left of this space, whatever 'left' means

    The space that is located to the left of this space, whatever 'left' means

    Definition Classes
    StrictRectangularSpaceViaFuturesStrictRectangularSpaceRectangularSpace
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def pathTo(other: Space[A], costFunction: CostFunction[A]): List[Space[A]]

    Permalink

    Finds the shortest path from this space to another space This is Dijkstra's algorithm, as the spaces aren't allowed to know where they are in relation they are to each other.

    Finds the shortest path from this space to another space This is Dijkstra's algorithm, as the spaces aren't allowed to know where they are in relation they are to each other.

    This short-circuts when it finds the desired space, and so is more efficient than pathToEverywhere which searches the whole field

    other

    the space to find the movementCost required to get to

    costFunction

    A function that defines the 'cost' of moving from the first space to the second space

    returns

    the a list of spaces such that the first space is this, the last space is other, and the movementcost between the two is minimal

    Definition Classes
    Space
  20. def rawDijkstraData(costFunction: CostFunction[A]): Map[Space[A], (Int, Space[A])]

    Permalink

    Returns the raw Dijkstra's algorithm data

    Returns the raw Dijkstra's algorithm data

    costFunction

    the function defining the cost to move from one space to another

    returns

    A map where the key is a space, and the value is the cost from here to the key, and how to get there.

    Definition Classes
    Space
  21. lazy val right: Option[StrictRectangularSpace[A]]

    Permalink

    The space that is located to the right of this space, whatever 'right' means

    The space that is located to the right of this space, whatever 'right' means

    Definition Classes
    StrictRectangularSpaceViaFuturesStrictRectangularSpaceRectangularSpace
  22. def spacesAfter(availableCost: Int, costFunction: CostFunction[A]): Set[Space[A]]

    Permalink

    Finds all the spaces that take exactly movementCost to get To.

    Finds all the spaces that take exactly movementCost to get To.

    availableCost

    the amount of movementCost available

    costFunction

    A function that defines the 'cost' of moving from the first space to the second space

    returns

    a set of all spaces that can be reached from this by moving into an adjacentTile using exactly movementCost

    Definition Classes
    Space
  23. def spacesWithin(availableCost: Int, costFunction: CostFunction[A]): Set[Space[A]]

    Permalink

    Finds all the spaces within a certain movementCost of this one.

    Finds all the spaces within a certain movementCost of this one.

    availableCost

    the amount of movementCost available

    costFunction

    A function that defines the 'cost' of moving from the first space to the second space

    returns

    a set of all spaces that can be reached from this by moving into an adjacentTile using movementCost or less

    Definition Classes
    Space
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. val typeOfSpace: A

    Permalink

    an object that defines how this space interacts with tokens

    an object that defines how this space interacts with tokens

    Definition Classes
    StrictRectangularSpaceViaFuturesSpace
  27. lazy val up: Option[StrictRectangularSpace[A]]

    Permalink

    The space that is located to the up of this space, whatever 'up' means

    The space that is located to the up of this space, whatever 'up' means

    Definition Classes
    StrictRectangularSpaceViaFuturesStrictRectangularSpaceRectangularSpace
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from StrictRectangularSpace[A]

Inherited from RectangularSpace[A]

Inherited from Space[A]

Inherited from AnyRef

Inherited from Any

Ungrouped