All Packages Class Hierarchy This Package Previous Next Index
Class EDU.gatech.cc.is.simulation.GolfBallSim
java.lang.Object
|
+----EDU.gatech.cc.is.simulation.AttractorSim
|
+----EDU.gatech.cc.is.simulation.GolfBallSim
- public class GolfBallSim
- extends AttractorSim
- implements SimulatedObject, SocRef
A golfball for RoboCup Soccer.
Introduction
GolfBallSim implements a golf ball for RoboCup
soccer simulations. The ball is also the scorekeeper and
the referee; after all who would know better whether a
scoring event occured?
A "shot clock" keeps track of how long since a scoring
event occured. If it times-out, the ball is reset to the
center of the field.
Copyright
(c)1997 Georgia Tech Research Corporation
- Version:
- $Revision: 1.3 $
- Author:
- Tucker Balch
-
DEBUG
-
-
GolfBallSim()
- Instantiate a golf ball.
-
draw(Graphics, int, int, double, double, double, double)
- Draw the golf ball and display score and shotclock.
-
eastJustScored()
- True if it is east just scored.
-
eastKickOff()
- True if it is east's turn to kick off.
-
playBall()
- True if the game is underway.
-
push(Vec2, Vec2)
- Handle a push.
-
takeStep(long, SimulatedObject[])
- Take a simulated step;
-
westJustScored()
- True if it is west just scored.
-
westKickOff()
- True if it is west's turn to kick off.
DEBUG
public static final boolean DEBUG
GolfBallSim
public GolfBallSim()
- Instantiate a golf ball.
takeStep
public void takeStep(long time_increment,
SimulatedObject all_objs[])
- Take a simulated step;
- Overrides:
- takeStep in class AttractorSim
push
public void push(Vec2 d,
Vec2 v)
- Handle a push. This is how to kick or push the ball.
- Overrides:
- push in class AttractorSim
draw
public void draw(Graphics g,
int w,
int h,
double t,
double b,
double l,
double r)
- Draw the golf ball and display score and shotclock.
- Overrides:
- draw in class AttractorSim
playBall
public boolean playBall()
- True if the game is underway. If false, the soccer robots
should reset their positions on the field according to
whether they kick off or not.
- Returns:
- true if game is underway.
eastKickOff
public boolean eastKickOff()
- True if it is east's turn to kick off.
- Returns:
- true if it is east's turn to kick off.
westKickOff
public boolean westKickOff()
- True if it is west's turn to kick off. This occurs
at the begining of the game, and after east scores.
- Returns:
- true if it is west's turn to kick off.
westJustScored
public boolean westJustScored()
- True if it is west just scored.
- Returns:
- true if west just scored.
eastJustScored
public boolean eastJustScored()
- True if it is east just scored.
- Returns:
- true if east just scored.
All Packages Class Hierarchy This Package Previous Next Index