We want to create a super class (sprite) that every on-screen character can inherit from. This is because the runner and the obstacles will behave similarly, and we can reduce a lot of similar code. This will involve refactoring most of the sheep class because it currently inherits from "obstacle" and should inherit from the sprite class instead.
The sprite class should include code to:
open and manipulate a sprite sheet
move the character onscreen
access the images opened from the sprite sheet
tell the sprite what image it should represent
various other tasks that involve mutation the sprite
maintain the "state" of the sprite for moving between animation sequences
Some of this code already exists but needs to be put in the correct class hierarchy so it can be abstracted and used by various kinds of sprites.
We want to create a super class (sprite) that every on-screen character can inherit from. This is because the runner and the obstacles will behave similarly, and we can reduce a lot of similar code. This will involve refactoring most of the sheep class because it currently inherits from "obstacle" and should inherit from the sprite class instead.
The sprite class should include code to: open and manipulate a sprite sheet move the character onscreen access the images opened from the sprite sheet tell the sprite what image it should represent various other tasks that involve mutation the sprite maintain the "state" of the sprite for moving between animation sequences
Some of this code already exists but needs to be put in the correct class hierarchy so it can be abstracted and used by various kinds of sprites.
~estimated 350 (discussed/posted in lab)
@andrewberls