Trait/Object

com.rayrobdod.boardGame

Space

Related Docs: object Space | package boardGame

Permalink

trait Space[A] extends AnyRef

A spot on a board game board

A

the type of spaceclass used by this class

Source
Space.scala
Version

3.0.0

Linear Supertypes
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Space
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def adjacentSpaces: Traversable[_ <: Space[A]]

    Permalink

    A space that is treated as adjacent to this one; such as a tile that can be directly accessed from this tile without passing through other tiles

  2. abstract def typeOfSpace: A

    Permalink

    an object that defines how this space interacts with tokens

Concrete 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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. 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

  7. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  16. 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

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

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

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

  20. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped