hockey.api
Class GoalKeeper

java.lang.Object
  |
  +--hockey.api.Player
        |
        +--hockey.api.GoalKeeper
All Implemented Interfaces:
IGoalKeeper, IGoalKeeperControl, IObject, IPlayer, IPlayerControl

public abstract class GoalKeeper
extends Player
implements IGoalKeeper, IGoalKeeperControl

The goal-keeper in your team should extend this class!

Implements the IGoalKeeper and IGoalKeeperControl interfaces to give you full control and information of the goal-keeper. Additionally it has some methods you must define to give information about your goal-keeper, and some convenience methods for easier control.

Most important is the step method that controls your goal-keeper.

See Also:
Player, IObject, IGoalKeeper, IPlayer, IGoalKeeperControl, IPlayerControl

Field Summary
 
Fields inherited from interface hockey.api.IGoalKeeperControl
MAX_GLIDE, MAX_THROW_SPEED
 
Fields inherited from interface hockey.api.IPlayerControl
ACCELERATION, MAX_SHOT_SPEED, MAX_SPEED, MAX_STICK_ANGLE, MAX_STICK_R, MAX_TURN_SPEED, MIN_STICK_ANGLE, MIN_STICK_R
 
Constructor Summary
GoalKeeper()
           
 
Method Summary
 int getGlide()
          Returns the goal-keeper's sidewards glide speed, in cm/s.
 IObject getGlove()
          Returns the current position of the goal-keeper's glove, as an IObject.
 int getTargetGlide()
          Returns the target glide speed.
 void glide(int glideSpeed)
          Accelerate gliding sidewards to the given speed.
 void setGoalKeeperControl(IGoalKeeper impl, IGoalKeeperControl ctrl)
          This method is used internally to receive the IGoalKeeper and IGoalKeeperControl associated with this goal-keeper.
 void skate(int x, int y, int speed)
          Accelerate to a given speed and move towards a given position by skating or gliding, but without turning.
 void skate(IObject o, int speed)
          Accelerate to a given speed and turn towards a given IObject with maximum turn speed.
 
Methods inherited from class hockey.api.Player
faceOff, getAimOnStick, getGoalKeeper, getHeading, getIndex, getName, getNumber, getPlayer, getPuck, getScore, getSpeed, getStick, getStickAngle, getStickR, getStickX, getStickY, getTargetHeading, getTargetSpeed, getTargetStickAngle, getTargetStickR, getTurnSpeed, getX, getY, hasPuck, init, isLeftHanded, isOpponent, moveStick, penaltyShot, setAimOnStick, setDebugPoint, setMessage, setPlayerControl, shoot, shoot, shoot, showDebugPoint, skate, step, turn, turn, turn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hockey.api.IPlayer
getIndex, getStick, getStickAngle, getStickR, getStickX, getStickY, hasPuck, isLeftHanded, isOpponent
 
Methods inherited from interface hockey.api.IObject
getHeading, getSpeed, getX, getY
 
Methods inherited from interface hockey.api.IPlayerControl
getAimOnStick, getGoalKeeper, getPlayer, getPuck, getScore, getTargetHeading, getTargetSpeed, getTargetStickAngle, getTargetStickR, getTurnSpeed, moveStick, setAimOnStick, setDebugPoint, setMessage, shoot, showDebugPoint, skate, turn
 

Constructor Detail

GoalKeeper

public GoalKeeper()
Method Detail

setGoalKeeperControl

public final void setGoalKeeperControl(IGoalKeeper impl,
                                       IGoalKeeperControl ctrl)
This method is used internally to receive the IGoalKeeper and IGoalKeeperControl associated with this goal-keeper.

Parameters:
impl - the goal-keeper's IGoalKeeper.
ctrl - the goal-keeper's IGoalKeeperControl.

getGlide

public int getGlide()
Description copied from interface: IGoalKeeper
Returns the goal-keeper's sidewards glide speed, in cm/s.

Specified by:
getGlide in interface IGoalKeeper

getGlove

public IObject getGlove()
Description copied from interface: IGoalKeeper
Returns the current position of the goal-keeper's glove, as an IObject.

Specified by:
getGlove in interface IGoalKeeper

getTargetGlide

public int getTargetGlide()
Description copied from interface: IGoalKeeperControl
Returns the target glide speed.

Specified by:
getTargetGlide in interface IGoalKeeperControl

glide

public void glide(int glideSpeed)
Description copied from interface: IGoalKeeperControl
Accelerate gliding sidewards to the given speed.

Specified by:
glide in interface IGoalKeeperControl

skate

public void skate(int x,
                  int y,
                  int speed)
Accelerate to a given speed and move towards a given position by skating or gliding, but without turning. Thus a goal-keeper's skate methods have different behaviour than a player's!

Overrides:
skate in class Player

skate

public void skate(IObject o,
                  int speed)
Description copied from class: Player
Accelerate to a given speed and turn towards a given IObject with maximum turn speed.

Overrides:
skate in class Player