Packages

  • package o1
    Definition Classes
    root
  • package grid

    This package contains tools for working with grid-like two-dimensional structures.

    This package contains tools for working with grid-like two-dimensional structures.

    The contents of this package have aliases in the top-level package o1, so they are accessible to students simply via import o1._.

    Definition Classes
    o1
  • CompassDir
  • Grid
  • GridPos

sealed abstract class CompassDir extends Product with Serializable

The class CompassDir represents the cardinal compass directions in a grid-like coordinate system. There are exactly four instances of this class: North, East, South and West, which are also defined in this package.

All the CompassDir objects are immutable.

This class and its instances have aliases in the top-level package o1, so they are accessible to students simply via import o1._.

See also

GridPos

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompassDir
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean
    Definition Classes
    Equals
  2. abstract def productArity: Int
    Definition Classes
    Product
  3. abstract def productElement(n: Int): Any
    Definition Classes
    Product

Concrete Value Members

  1. def clockwise: CompassDir

    Returns the next of the four compass directions, moving clockwise from this one.

    Returns the next of the four compass directions, moving clockwise from this one. For instance, calling this method on North returns East.

  2. def counterClockwise: CompassDir

    Returns the next of the four compass directions, moving counterclockwise from this one.

    Returns the next of the four compass directions, moving counterclockwise from this one. For instance, calling this method on North returns West.

  3. def productElementName(n: Int): String
    Definition Classes
    Product
  4. def productElementNames: Iterator[String]
    Definition Classes
    Product
  5. def productIterator: Iterator[Any]
    Definition Classes
    Product
  6. def productPrefix: String
    Definition Classes
    Product
  7. def toString: String

    Returns a textual description of this direction, which is the English name of the direction.

    Returns a textual description of this direction, which is the English name of the direction.

    Definition Classes
    CompassDir → AnyRef → Any
  8. val xStep: Int
  9. val yStep: Int