gamedom1.agent
Class LocalParserDom1

java.lang.Object
  extended by gamedom1.agent.LocalParserDom1
All Implemented Interfaces:
CheatManagerIF, ServerCommandParserIF

public class LocalParserDom1
extends java.lang.Object
implements ServerCommandParserIF, CheatManagerIF

This class processes the ServerCommands and decides who has the right to do what.


Field Summary
 boolean cheat
           
 
Constructor Summary
LocalParserDom1()
           
 
Method Summary
 Vec2f getGoal(UnitIF uif, PlayerIF p)
           
 void parseCommand(AttackCommand command)
           
 void parseCommand(MoveCommand command)
           
 void parseCommand(ServerCommand command)
          Just to prove that you can't substitute "intanceof" with polymorphism.
 void parseCommand(StopCommand command)
           
 void setCheat(boolean c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cheat

public boolean cheat
Constructor Detail

LocalParserDom1

public LocalParserDom1()
Method Detail

parseCommand

public void parseCommand(ServerCommand command)
Just to prove that you can't substitute "intanceof" with polymorphism.

Specified by:
parseCommand in interface ServerCommandParserIF

parseCommand

public void parseCommand(MoveCommand command)

parseCommand

public void parseCommand(AttackCommand command)

parseCommand

public void parseCommand(StopCommand command)

getGoal

public Vec2f getGoal(UnitIF uif,
                     PlayerIF p)
Specified by:
getGoal in interface CheatManagerIF

setCheat

public void setCheat(boolean c)
Specified by:
setCheat in interface CheatManagerIF