ant.debug
Class AntDebugger

java.lang.Object
  extended byjava.awt.event.WindowAdapter
      extended byant.debug.AntDebugger
All Implemented Interfaces:
java.awt.event.AdjustmentListener, Constants, java.util.EventListener, java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.awt.event.WindowStateListener

public class AntDebugger
extends java.awt.event.WindowAdapter
implements Constants, java.awt.event.AdjustmentListener

This class reads in a file with the following format: ...


Field Summary
 boolean back
           
static int BLACK_ANT
           
static int BLACK_ANT_HILL
           
(package private)  java.io.BufferedReader fileReader
           
static int FREE
           
static int MARKER_BLACK_0
           
static int MARKER_BLACK_1
           
static int MARKER_BLACK_2
           
static int MARKER_BLACK_3
           
static int MARKER_BLACK_4
           
static int MARKER_BLACK_5
           
static int MARKER_RED_0
           
static int MARKER_RED_1
           
static int MARKER_RED_2
           
static int MARKER_RED_3
           
static int MARKER_RED_4
           
static int MARKER_RED_5
           
(package private)  MyActionListener myActionListener
           
(package private)  MyCanvas myCanvas
           
 boolean oneStep
           
static int OPTION_MARKER_3C
           
static int OPTION_MARKER_BIT
           
static int OPTION_MARKER_FM
           
static int options
           
static int PIX_LENGTH
           
static int RED_ANT
           
static int RED_ANT_HILL
           
static int ROCK
           
 java.util.List rounds
           
 int slowDown
           
 boolean stop
           
(package private)  java.awt.Window window
           
static int WITH_FOOD
           
 AntWorld world
           
 
Constructor Summary
AntDebugger()
           
 
Method Summary
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
           
static void main(java.lang.String[] args)
           
 void printWorld()
           
 void readAllRounds()
           
protected  void readMap(java.lang.String fileName)
           
 boolean readOptions(java.lang.String[] args)
           
 void showWorld()
           
 void usage()
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

world

public AntWorld world

myActionListener

MyActionListener myActionListener

rounds

public java.util.List rounds

fileReader

java.io.BufferedReader fileReader

window

java.awt.Window window

myCanvas

MyCanvas myCanvas

stop

public boolean stop

back

public boolean back

oneStep

public boolean oneStep

slowDown

public int slowDown

options

public static int options

MARKER_RED_0

public static final int MARKER_RED_0
See Also:
Constant Field Values

MARKER_RED_1

public static final int MARKER_RED_1
See Also:
Constant Field Values

MARKER_RED_2

public static final int MARKER_RED_2
See Also:
Constant Field Values

MARKER_RED_3

public static final int MARKER_RED_3
See Also:
Constant Field Values

MARKER_RED_4

public static final int MARKER_RED_4
See Also:
Constant Field Values

MARKER_RED_5

public static final int MARKER_RED_5
See Also:
Constant Field Values

MARKER_BLACK_0

public static final int MARKER_BLACK_0
See Also:
Constant Field Values

MARKER_BLACK_1

public static final int MARKER_BLACK_1
See Also:
Constant Field Values

MARKER_BLACK_2

public static final int MARKER_BLACK_2
See Also:
Constant Field Values

MARKER_BLACK_3

public static final int MARKER_BLACK_3
See Also:
Constant Field Values

MARKER_BLACK_4

public static final int MARKER_BLACK_4
See Also:
Constant Field Values

MARKER_BLACK_5

public static final int MARKER_BLACK_5
See Also:
Constant Field Values

RED_ANT

public static final int RED_ANT
See Also:
Constant Field Values

BLACK_ANT

public static final int BLACK_ANT
See Also:
Constant Field Values

WITH_FOOD

public static final int WITH_FOOD
See Also:
Constant Field Values

FREE

public static final int FREE
See Also:
Constant Field Values

RED_ANT_HILL

public static final int RED_ANT_HILL
See Also:
Constant Field Values

BLACK_ANT_HILL

public static final int BLACK_ANT_HILL
See Also:
Constant Field Values

ROCK

public static final int ROCK
See Also:
Constant Field Values

PIX_LENGTH

public static final int PIX_LENGTH
See Also:
Constant Field Values

OPTION_MARKER_BIT

public static final int OPTION_MARKER_BIT
See Also:
Constant Field Values

OPTION_MARKER_3C

public static final int OPTION_MARKER_3C
See Also:
Constant Field Values

OPTION_MARKER_FM

public static final int OPTION_MARKER_FM
See Also:
Constant Field Values
Constructor Detail

AntDebugger

public AntDebugger()
Method Detail

readMap

protected void readMap(java.lang.String fileName)
                throws java.lang.Exception
Throws:
java.lang.Exception

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener

showWorld

public void showWorld()
               throws java.lang.Exception
Throws:
java.lang.Exception

printWorld

public void printWorld()

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener

readAllRounds

public void readAllRounds()
                   throws java.lang.Exception
Throws:
java.lang.Exception

readOptions

public boolean readOptions(java.lang.String[] args)

usage

public void usage()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception