ctf.environment
Class TestPlaySurface

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--ctf.environment.TestPlaySurface

public class TestPlaySurface
extends Frame
implements StateChangeListener

Frame for running agent CTF games w/visualization and GUI controls.

Author:
Jason Rohrer
See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
Component.AWTTreeLock
 
Field Summary
(package private)  Class[] mAvailableClasses
           
(package private)  BoardSet mBoardSet
           
(package private)  Choice mColorChoice
           
(package private)  Label mColorChoiceLabel
           
(package private)  GameColorMap mColorMap
           
(package private)  Choice mDelayChoice
           
(package private)  Label mDelayChoiceLabel
           
(package private)  int mDrawThreshold
           
(package private)  Game mGame
           
(package private)  Choice mNumAgentsChoice
           
(package private)  Label mNumAgentsChoiceLabel
           
(package private)  int mNumAgentsPerTeam
           
(package private)  Choice mObstacleChoice
           
(package private)  Label mObstacleChoiceLabel
           
(package private)  ObstacleSet mObstacleSet
           
(package private)  Button mPauseButton
           
(package private)  Button mQuitButton
           
(package private)  boolean mReadyToPaint
           
(package private)  Label mScoreLabel
           
(package private)  String mSetsDirName
           
(package private)  Choice mTeam1Choice
           
(package private)  Label mTeam1ChoiceLabel
           
(package private)  int mTeam1Score
           
(package private)  Label mTeam1ScoreLabel
           
(package private)  Choice mTeam2Choice
           
(package private)  Label mTeam2ChoiceLabel
           
(package private)  int mTeam2Score
           
(package private)  Label mTeam2ScoreLabel
           
(package private)  Class[] mTeamClasses
           
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
inputContext, OPENED, ownedWindowList, state, warningString, windowListener
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, ncomponents
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
TestPlaySurface()
           
 
Method Summary
static void main(String[] argv)
           
 void paint(Graphics inGraphics)
           
 void stateChanged()
           
 void update(Graphics inGraphics)
           
 
Methods inherited from class java.awt.Frame
, addNotify, addToFrameList, constructComponentName, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, paramString, postProcessKeyEvent, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, processWindowEvent, removeOwnedWindow, removeWindowListener, setCursor, setFocusOwner, show, toBack, toFront, transferFocus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getCursorTarget, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, paintComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFont, setLayout, updateCursor, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getIntrinsicCursor, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mPauseButton

Button mPauseButton

mColorChoiceLabel

Label mColorChoiceLabel

mColorChoice

Choice mColorChoice

mSetsDirName

String mSetsDirName

mObstacleChoiceLabel

Label mObstacleChoiceLabel

mObstacleChoice

Choice mObstacleChoice

mTeam1ChoiceLabel

Label mTeam1ChoiceLabel

mTeam1Choice

Choice mTeam1Choice

mTeam2ChoiceLabel

Label mTeam2ChoiceLabel

mTeam2Choice

Choice mTeam2Choice

mNumAgentsChoiceLabel

Label mNumAgentsChoiceLabel

mNumAgentsChoice

Choice mNumAgentsChoice

mDelayChoiceLabel

Label mDelayChoiceLabel

mDelayChoice

Choice mDelayChoice

mTeam1Score

int mTeam1Score

mTeam2Score

int mTeam2Score

mScoreLabel

Label mScoreLabel

mTeam1ScoreLabel

Label mTeam1ScoreLabel

mTeam2ScoreLabel

Label mTeam2ScoreLabel

mQuitButton

Button mQuitButton

mDrawThreshold

int mDrawThreshold

mGame

Game mGame

mBoardSet

BoardSet mBoardSet

mObstacleSet

ObstacleSet mObstacleSet

mAvailableClasses

Class[] mAvailableClasses

mTeamClasses

Class[] mTeamClasses

mColorMap

GameColorMap mColorMap

mNumAgentsPerTeam

int mNumAgentsPerTeam

mReadyToPaint

boolean mReadyToPaint
Constructor Detail

TestPlaySurface

public TestPlaySurface()
Method Detail

main

public static void main(String[] argv)

paint

public void paint(Graphics inGraphics)
Overrides:
paint in class Container

update

public void update(Graphics inGraphics)
Overrides:
update in class Container

stateChanged

public void stateChanged()
Specified by:
stateChanged in interface StateChangeListener