Acceptance criteria
- Hover movement follows the animal's zooming and hovering states.
HoverBehavior class as specified in the diagram below.
new Random(DateTime.Now.Millisecond)NextProcess methodstepCount to a random number between 5 and 8 (inclusive).HorizontalDirection.VerticalDirection.stepCount to a random number between 7 and 10 (inclusive).Move methodstepCount is 0 (the animal has run out of steps to take).If it is, call the NextProcess method and pass in the animal.
stepCount by 1.int named moveDistance.This will reference how far the animal moves depending on if it's hovering or zooming.
moveDistance variable to the animal's MoveDistance, assign the animal's XDirection to a random HorizontalDirection and the animal's YDirection to a random Vertical Direction.moveDistance variable to the 4 times the animal's MoveDistance.MoveHelper's MoveHorizontally and MoveVertically to move the animal, using the moveDistance variable as the argument.It should move a single step in a random direction between 7 and 10 times; then it should zoom in a single direction for 5 to 8 paces; then it should switch to hovering and start the cycle over again.

ClimbBehavior class as specified in the diagram below.
new Random(DateTime.Now.Millisecond)NextProcess method'states' (Climbing, Falling, Scurrying).lowerMax is the smallest distance the animal can climb to before falling and the higherMax is the highest distance it can climb to before falling. Then it assigns the maxHeight field to a value within those ranges.int higherMax = Convert.ToInt32(Math.Floor(Convert.ToDouble(animal.YPositionMax) * 0.15));
int lowerMax = Convert.ToInt32(Math.Floor(Convert.ToDouble(animal.YPositionMax) * 0.85));
this.maxHeight = ClimbBehavior.random.Next(higherMax, lowerMax + 1);
Move method'states'.MoveDistance is less than or equal to the maxHeight:NextProcess methodMoveDistance is greater than or equal to the YPositionMax, call the NextProcess.NextProcess.It should move horizontally until it hits a vertical edge; then it should move vertically until it hits a random maximum height; then it should fall at a steep angle until it hits the bottom of the cage; then it should move horizontally and start the cycle over again.

© 2026 Northcentral Technical College