|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--fi.utu.cs.hockey.Game
A hockey game.
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary | |
int |
getFaceoffSpot()
Returns the faceoff spot. |
Team |
getHome()
Returns the home team. |
Puck |
getPuck()
Returns the puck. |
int |
getScore(boolean home)
Returns the score for the home team if home == true ,
otherwise the score for the visiting team. |
long |
getTime()
Returns the time left in the game in milliseconds. |
Team |
getVisitor()
Returns the visiting team. |
boolean |
isFoul(boolean h)
Returns true , if h == true and
the home team commits a foul, or if h == false
and the visiting team commits a foul. |
boolean |
isGameOver()
Returns true , if the game is over. |
boolean |
isGameStopped()
Returns true , if the game is stopped. |
boolean |
isGoal(boolean h)
Returns true , if h == true and
the home team has scored, or if h == false
and the visiting team has scored. |
boolean |
isGoalieKeepingPuck(boolean h)
Returns true , if h == true and
the home team goalie keeps the puck, or if h == false
and the visiting team goalie keeps the puck. |
boolean |
isIcing(boolean h)
Returns true , if h == true and
the home team causes an icing, or if h == false
and the visiting team causes an icing. |
boolean |
isInterferingGoalie(boolean h)
Returns true , if h == true and
the home team is interfering the goalie, or if h == false
and the visiting team is interfering the goalie. |
boolean |
isOffside(boolean h)
Returns true , if h == true and
the home team causes an offside, or if h == false
and the visiting team causes an offside. |
boolean |
isPuckUnplayable()
Returns true , if the puck has become
unplayable. |
void |
keepPuck(Player p)
Lets the goalkeeper p keep the puck, if possible. |
void |
run()
Runs the game. |
void |
shoot(Player p,
double s)
Lets the player p shoot the puck with the proportional
power s , if possible. |
void |
teamUpdated()
Signal that teams have been updated. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public Team getHome()
public Team getVisitor()
public Puck getPuck()
public long getTime()
public int getScore(boolean home)
home == true
,
otherwise the score for the visiting team.
public void teamUpdated()
public boolean isGameStopped()
true
, if the game is stopped.
public boolean isGameOver()
true
, if the game is over.
public int getFaceoffSpot()
FaceOff
public boolean isGoal(boolean h)
true
, if h == true
and
the home team has scored, or if h == false
and the visiting team has scored.
public boolean isOffside(boolean h)
true
, if h == true
and
the home team causes an offside, or if h == false
and the visiting team causes an offside.
public boolean isIcing(boolean h)
true
, if h == true
and
the home team causes an icing, or if h == false
and the visiting team causes an icing.
public boolean isInterferingGoalie(boolean h)
true
, if h == true
and
the home team is interfering the goalie, or if h == false
and the visiting team is interfering the goalie.
public boolean isGoalieKeepingPuck(boolean h)
true
, if h == true
and
the home team goalie keeps the puck, or if h == false
and the visiting team goalie keeps the puck.
public boolean isFoul(boolean h)
true
, if h == true
and
the home team commits a foul, or if h == false
and the visiting team commits a foul.
public boolean isPuckUnplayable()
true
, if the puck has become
unplayable.
public void shoot(Player p, double s)
p
shoot the puck with the proportional
power s
, if possible.
public void keepPuck(Player p)
p
keep the puck, if possible.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |