src/main/java/org/teachingextensions/logo/Turtle.java
public void setSpeed(int speed)
  {
    if (speed != TEST_SPEED)
    {
      if (speed < 1 || 10 < speed) { throw new RuntimeException(String.format(
          "I call shenanigans!!!\nThe speed '%s' is not between the acceptable range of [1-10]\nPerhaps you should read the documentation",
          speed)); }
    }
    this.speed = speed;
  }
public void setSpeed(int speed)
  {
    if (speed != TEST_SPEED)
    {
      if (speed < 1 || 10 < speed) { throw new RuntimeException(String.format(
          "I call shenanigans!!!\nThe speed '%s' is not between the acceptable range of [1-10]\nPerhaps you should read the documentation",
          speed)); }
    }
    this.speed = speed;
  }
public void setSpeed ( int speed ) { if ( speed != TEST_SPEED ) { if ( speed < 1 || 10 < speed ) { throw new RuntimeException ( String . format ( "I call shenanigans!!!\nThe speed '%s' is not between the acceptable range of [1-10]\nPerhaps you should read the documentation" , speed ) ) ; } } this . speed = speed ; }
Sets the speed that a turtle instance moves
<p><b>Example:</b> {@code myTurtle.setSpeed(speed)}</p>

@param speed
The speed from 1 (slowest) to 10 (fastest)
Sets the speed that a turtle instance moves <p > <b > Example : < / b > { @code myTurtle . setSpeed ( speed ) } < / p >