package space
A set of three traits used to describe quantized spaces: Spaces that can be described with a set of locations (to give the space... space!) and a set of directions (to traverse the space).
1. Space
- Contains any operations that can be applied to arbitrary spaces.
- Implementing Space requires an implementation of Location and Direction.
2. Location
- An atom of space.
- A container for whatever you want in your space!
3. Direction
- A direction in which adjacent locations to some reference location may be found.
Type Members
-
trait
Direction extends AnyRef
A direction in space.
A direction in space.
1D Examples (Pairs of directions):
- Forward and Backward
- Left and Right
- Up and Down
- CW and CCW
- In and Out
For ND (N dimensions) use some combination of N direction pairs.
-
trait
Location extends AnyRef
A discrete unit of space.
-
trait
Space[D <: Direction, L <: Location] extends AnyRef
A space of arbitrary dimensionality.
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)