§ 5. Snakes

They were the big four, […] here now we are the four of us:
old Matt Gregory and old Marcus and old Luke Tarpey:
the four of us and sure, thank God, there are no more of us:
and, sure now, you wouldn’t go and forget and leave out
the other fellow and old Johnny MacDougall: the four of us
and no more of us and so now pass the fish for Christ sake, Amen:

[Click.]

  1. Constructor Function: GreenSnake
  2. Constructor Function: BlueSnake
  3. Constructor Function: OrangeSnake
  4. Constructor Function: RedEyeSnake
  5. Constructor Function: LoopySnake
  6. Aliases
function GreenSnake() {
  Snake.call(this, {
    delay: 800,
    length: 10,
    width: 25,
    skinColor: 'green',
    eyeColor: 'blue'
  });
}
function BlueSnake() {
  Snake.call(this, {
    delay: 400,
    length: 32,
    width: 15,
    skinColor: 'blue',
    eyeColor: 'yellow'
  });
}
function OrangeSnake() {
  Snake.call(this, {
    delay: 100,
    length: 16,
    width: 20,
    skinColor: 'orange',
    eyeColor: 'purple'
  });
}
function RedEyeSnake() {
  Snake.call(this, {
    delay: 600,
    length: 8,
    width: 18,
    skinColor: 'transparent',
    eyeColor: 'red'
  });
}
function LoopySnake() {
  const snake = new FastSnake();
  snake.beginMethod('Route66').goEast(6).goNorth(6).goWest(6).goSouth(6).endMethod();
  snake.beginMethod('InfiniteLoop').whileTrue(true).doMethod('Route66').endMethod();
  snake.doMethod('InfiniteLoop');
}

const LongSnake = BlueSnake;
const ShortSnake = RedEyeSnake;
const FastSnake = OrangeSnake;
const SlowSnake = GreenSnake;
const BareBonesSnake = RedEyeSnake;