nanomunchers.bot
Class NanoBotWrangler

java.lang.Object
  extended bynanomunchers.bot.NanoBotWrangler

public class NanoBotWrangler
extends java.lang.Object

Holds all of the Nanobots and knows what bots are associated with a given PlayerToken.

Author:
David Kaplin

Constructor Summary
NanoBotWrangler()
          Initializes the BotWrangler
 
Method Summary
 boolean addNanoBot(heurgame.PlayerToken owner, NanoBot newBot)
          Adds a nanomuncher in the name of the owner if there are no other bots of the owner's at that location.
 java.util.Vector getNanoBots(heurgame.PlayerToken owner)
           
 void removeDuplicates()
          If different players have any bots in the same location, this is where they are removed from play.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NanoBotWrangler

public NanoBotWrangler()
Initializes the BotWrangler

Method Detail

addNanoBot

public boolean addNanoBot(heurgame.PlayerToken owner,
                          NanoBot newBot)
Adds a nanomuncher in the name of the owner if there are no other bots of the owner's at that location.

Parameters:
owner - of the bot in question
newBot - bot in question
Returns:
true if there is no other bot at that point

getNanoBots

public java.util.Vector getNanoBots(heurgame.PlayerToken owner)
Parameters:
owner - of the bots
Returns:
bots that are owned by the owner, null if none

removeDuplicates

public void removeDuplicates()
If different players have any bots in the same location, this is where they are removed from play.