Chameleon
Category: Critters
Author: Stuart Reges
Book Chapter: 9.2
Problem: Chameleon
Write a class called Chameleon that extends the Critter class. The instances of the Chameleon class cycle through three different ways of displaying themselves. On their first move they should appear as a red R. On their second move they should appear as a white W. On their third move they should appear as a blue B. Then this pattern repeats itself (red R, white W, blue B, red R, white W, blue B, etc). They should always infect on moves when they are red no matter what is in front of them. On moves when they are white or blue, they should hop when they can and turn right when they can't hop.