bsoc.socsim
Class SocSim

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--bsoc.socsim.SocSim
Direct Known Subclasses:
AlphaSim

public class SocSim
extends java.lang.Thread

Soccer simulation that may run abstract robots from JavaBot.


Field Summary
static int CHANGED_FOR_GRAPHICS
           
static int CHANGED_FOR_INFO
           
static int STOPPED
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SocSim()
           
 
Method Summary
 void addAndInitRobotEast(EDU.gatech.cc.is.abstractrobot.ControlSystemS cs, int nr)
          Should be used in addAndInitRobots().
 void addAndInitRobots()
          Should be overridden by subclasses.
 void addAndInitRobotWest(EDU.gatech.cc.is.abstractrobot.ControlSystemS cs, int nr)
          Should be used in addAndInitRobots().
 void addAndInitSimulatedObjects()
          Initializes all objects that are needed beside robots.
 void addListener(SocSimListener listener)
           
 EDU.gatech.cc.is.abstractrobot.ControlSystemS[] controlSystems()
           
 void finalizeControlSystems()
           
 double getBottom()
           
 long getCurrentTime()
           
 int getEastscore()
           
 double getLeft()
           
 double getRight()
           
 long getSimulationSteps()
           
 double getTop()
           
 int getWestscore()
           
 void initRobotsAtStartup()
           
 void initValues()
           
 boolean matchShouldStop()
           
 void performEvent(int id)
           
 void removeListener(SocSimListener listener)
           
 void removeSimulatedObjects()
           
 void resetMatch()
           
 void restartMatch()
           
 void run()
           
 void setNotificationIntervalGraphics(int val)
           
 void setNotificationIntervalInfo(int val)
           
 void setupSimulatedObjects()
          Must always be called after new Robots are set to the simulation.
 EDU.gatech.cc.is.simulation.SimulatedObject[] simulatedObjects()
           
 void stopMatch()
           
 void stopSimulation()
           
 void takeStep()
           
 java.lang.String toInfoString()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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
 

Field Detail

CHANGED_FOR_INFO

public static int CHANGED_FOR_INFO

CHANGED_FOR_GRAPHICS

public static int CHANGED_FOR_GRAPHICS

STOPPED

public static int STOPPED
Constructor Detail

SocSim

public SocSim()
Method Detail

initRobotsAtStartup

public void initRobotsAtStartup()

initValues

public void initValues()

addAndInitSimulatedObjects

public void addAndInitSimulatedObjects()
Initializes all objects that are needed beside robots.

addAndInitRobots

public void addAndInitRobots()
Should be overridden by subclasses.

addAndInitRobotWest

public void addAndInitRobotWest(EDU.gatech.cc.is.abstractrobot.ControlSystemS cs,
                                int nr)
Should be used in addAndInitRobots().

addAndInitRobotEast

public void addAndInitRobotEast(EDU.gatech.cc.is.abstractrobot.ControlSystemS cs,
                                int nr)
Should be used in addAndInitRobots().

setupSimulatedObjects

public void setupSimulatedObjects()
Must always be called after new Robots are set to the simulation.

setNotificationIntervalInfo

public void setNotificationIntervalInfo(int val)

setNotificationIntervalGraphics

public void setNotificationIntervalGraphics(int val)

run

public void run()
Overrides:
run in class java.lang.Thread

takeStep

public void takeStep()

matchShouldStop

public boolean matchShouldStop()

finalizeControlSystems

public void finalizeControlSystems()

resetMatch

public void resetMatch()

removeSimulatedObjects

public void removeSimulatedObjects()

stopMatch

public void stopMatch()

stopSimulation

public void stopSimulation()

restartMatch

public void restartMatch()

getTop

public double getTop()

getBottom

public double getBottom()

getLeft

public double getLeft()

getRight

public double getRight()

getCurrentTime

public long getCurrentTime()

getSimulationSteps

public long getSimulationSteps()

simulatedObjects

public EDU.gatech.cc.is.simulation.SimulatedObject[] simulatedObjects()

controlSystems

public EDU.gatech.cc.is.abstractrobot.ControlSystemS[] controlSystems()

addListener

public void addListener(SocSimListener listener)

removeListener

public void removeListener(SocSimListener listener)

performEvent

public void performEvent(int id)

toInfoString

public java.lang.String toInfoString()

getEastscore

public int getEastscore()

getWestscore

public int getWestscore()