Interface frog.IFrog


public interface IFrog
extends Object
Interface that represents a frog.


Method Index

 o getColor ()
Accessor method for the color of the frog
 o getHit ()
The hits the frog
 o getPos ()
Accessor method for the position of the frog
 o moveBy (Point)
Requests that the frog be translated the position by the given vector (Point)

Methods

 o getPos
public abstract Point getPos()
Accessor method for the position of the frog.

Returns:
The position Point of the frog
 o getColor
public abstract Color getColor()
Accessor method for the color of the frog. A live frog is green and a dead frog is red.

Returns:
The Color of the frog
 o moveBy
public abstract Point moveBy(Point delta)
Requests that the frog be translated the position by the given vector (Point). Live frogs move by the given amount. Dead frogs do not move.

Parameters:
delta - The amount to move the frog by.
Returns:
The resultant position of the frog
 o getHit
public abstract IFrog getHit()
The hits the frog. A live frog will die when it gets hit. A dead frog stays dead when gets hit.

Returns:
The frog itself is returned.