bot
Class Coordinator

java.lang.Object
  extended bybot.Main
      extended bybot.Coordinator

public class Coordinator
extends bot.Main

Handles building stuff.


Constructor Summary
Coordinator()
           
 
Method Summary
static BoardGenerator constructBoardGenerator(String boardName)
          Given a String either make a Generator for that board name, or make a generator of that name.
static BotFactory constructBotGenerator(String bot)
          Turn that string into something real.
 Runner createRunner(BotFactory botF, BoardGenerator boardF)
          This builds the runner--if you want a different kind of runner but want to keep the coordination stuff, override this method.
 Runner createRunner(String botName, String boardName)
          Create a Runner.
static BoardGenerator friendlyConstructBoardGenerator(String boardName)
          Friendly methods handle errors.
static BotFactory friendlyConstructBotFactory(String botName)
          Friendly methods handle errors.
protected static String getFlagValue(String flag)
           
protected static boolean hasFlag(String flag)
           
protected static String[] stripFlags(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Coordinator

public Coordinator()
Method Detail

createRunner

public Runner createRunner(String botName,
                           String boardName)
Create a Runner. If two nulls are passed, then the Runner will prompt user for bot and board later on.


createRunner

public Runner createRunner(BotFactory botF,
                           BoardGenerator boardF)
This builds the runner--if you want a different kind of runner but want to keep the coordination stuff, override this method.

If both parameters are null, Runner is responsible for prompting to get bot and board.


constructBoardGenerator

public static BoardGenerator constructBoardGenerator(String boardName)
Given a String either make a Generator for that board name, or make a generator of that name.


constructBotGenerator

public static BotFactory constructBotGenerator(String bot)
Turn that string into something real.


friendlyConstructBoardGenerator

public static BoardGenerator friendlyConstructBoardGenerator(String boardName)
Friendly methods handle errors.


friendlyConstructBotFactory

public static BotFactory friendlyConstructBotFactory(String botName)
Friendly methods handle errors.


hasFlag

protected static boolean hasFlag(String flag)

getFlagValue

protected static String getFlagValue(String flag)

stripFlags

protected static String[] stripFlags(String[] args)