Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Turtle

Turtle interface.

Defines the interface that any turtle must implement. Note that the standard directions/rotations use Logo semantics: initial heading of zero is 'up', and positive angles rotate the turtle clockwise.

Hierarchy

  • Turtle

Implemented by

Index

Methods

  • Change the turtle's current pen color.

    Parameters

    Returns void

  • forward(units: number): void
  • Move the turtle forward a number of steps.

    Parameters

    • units: number

      number of steps to move in the current direction; must be positive

    Returns void

  • getSVG(): string
  • Get the image created by this turtle.

    Returns string

    string containing image in SVG format.

  • turn(degrees: number): void
  • Change the turtle's heading by a number of degrees clockwise.

    Parameters

    • degrees: number

      amount of change in angle, in degrees, with positive being clockwise

    Returns void

Generated using TypeDoc