CS 290 Introduction to Game Development - Lab 9                                  

  1. Implement a new class EvadeSprite derived from class Sprite. Its logic is similar to that of ChaseSprite, but objects of EvadeSprite will try to get away from the sprite being evaded. Unlike ChaseSprite, objects of class EvadeSprite will begin moving away only when they are within a certain distance from the sprite being evaded. The length of the distance must be passed as a parameter into the constructor of this class. Similar to ChaseSprite, objects of EvadeSprite will move randomly if they are not moving away from the sprite being evaded.
  2. Modify all pirate sprites and make them objects of class EvadeSprite.