Class frog.AFrogState


abstract class AFrogState
extends Object
Represents an abstract state of a frog.


Method Index

 o getColor (Frog)
Accessor method for the color of the frog
 o getHit (Frog)
Hits the frog
 o moveBy (Frog, Point)
Move request to move the frog

Methods

 o getColor

abstract Color getColor(Frog context)

Accessor method for the color of the frog.

Parameters:
context - The context of this state.
Returns:
The color of the frog.
 o moveBy

abstract Point moveBy(Frog context, Point delta)

Move request to move the frog.

Parameters:
context - The context of this state.
Returns:
The new position of the frog.
 o getHit

abstract IFrog getHit(Frog context)

Hits the frog.

Parameters:
context - The context of this state.
Returns:
The frog.