virtual robots that can be moved around

Hierarchy

Constructors

Properties

defaultIndices: GridIndices

The location the robot should be in at the beginning of a regular chess.

homeIndices: GridIndices

The location the robot lives in when its not in use.

id: string
startHeadingRadians: number = 0
tunnel: null | BotTunnel

Accessors

  • get headingRadians(): number
  • Returns number

  • set headingRadians(headingRadians: number): void
  • Parameters

    • headingRadians: number

    Returns void

Methods

  • Parameters

    • headingRadians: number

      An absolute heading to turn to, in radians. 0 is up (from white to black). CW is positive.

    Returns Promise<void>

  • Parameters

    • deltaHeadingRadians: number

      A relative heading to turn by, in radians.

    Returns Promise<void>

  • Parameters

    • startPosition: {
          x: number;
          y: number;
      }
      • x: number
      • y: number
    • endPosition: {
          x: number;
          y: number;
      }
      • x: number
      • y: number
    • controlPositionA: {
          x: number;
          y: number;
      }
      • x: number
      • y: number
    • controlPositionB: {
          x: number;
          y: number;
      }
      • x: number
      • y: number
    • timeDeltaMs: number

    Returns Promise<void>

  • Send a packet to the robot indicating distance to drive. Returns a promise that finishes when the robot finishes the action.

    Parameters

    • tileDistance: number

      The distance to drive forward or backwards by. 1 is defined as the length of a tile.

    Returns Promise<void>

  • Parameters

    • startPosition: {
          x: number;
          y: number;
      }
      • x: number
      • y: number
    • endPosition: {
          x: number;
          y: number;
      }
      • x: number
      • y: number
    • controlPosition: {
          x: number;
          y: number;
      }
      • x: number
      • y: number
    • timeDeltaMs: number

    Returns Promise<void>

  • Send a packet to the robot indicating distance to drive, in ticks. Returns a promise that finishes when the robot finishes the action.

    Parameters

    • distanceTicks: number

      The distance to drive forward or backwards by, in ticks.

    Returns Promise<void>

  • Send a packet to the robot indicating angle to turn. Returns a promise that finishes when the robot finishes the action.

    Parameters

    • deltaHeadingRadians: number

      A relative heading to turn by, in radians. May be positive or negative.

    Returns Promise<void>

Generated using TypeDoc