Class ServerBotFactory

java.lang.Object
za.co.wethinkcode.robots.server.serverRobot.ServerBotFactory

public class ServerBotFactory extends Object
Factory pattern for creating ServerRobots
  • Constructor Details

    • ServerBotFactory

      public ServerBotFactory()
      Empty constructor for this factory
  • Method Details

    • create

      public ServerRobot create(String name, RobotKind kind, Integer maxShieldStrength, Integer maximumShots, WorldState worldState) throws WorldFullException
      Create a new server robot
      Parameters:
      name - the name of the new robot
      kind - what kind of robot it is according to RobotKind
      maxShieldStrength - maximum shield strength of this robot
      maximumShots - maximum number of shots this robot can have
      worldState - the worldState that this boring bot is being made into
      Returns:
      a new server robot
      Throws:
      WorldFullException - if the world already full, this create will fail early