Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## robocode.control
Class BattleSpecification

    java.lang.Object
      robocode.control.BattleSpecification

    public class BattleSpecification

extends java.lang.Object

Defines a battle

Author:
  Mathew A. Nelson (original), Flemming N. Larsen (contributor)

Constructor Summary
`BattleSpecification(int numRounds, BattlefieldSpecification battlefield, RobotSpecification[] robotSpecifications)` Creates a BattleSpecification with the given number of rounds, battlefield, and robots inactivityTime defaults to 450.
`BattleSpecification(int numRounds, long inactivityTime, double gunCoolingRate, BattlefieldSpecification battlefield, RobotSpecification[] robots)` Creates a BattleSpecification with the given number of rounds, inactivityTime, gunCoolingRate, battlefield, and robots

Method Summary
`BattlefieldSpecification` | `getBattlefield()` Gets the battleField for this battle
`robocode.battle.BattleProperties` | `getBattleProperties()` Deprecated.
`double` | `getGunCoolingRate()` Gets the gunCoolingRate for this battle
`long` | `getInactivityTime()` Gets the inactivityTime for this battle
`int` | `getNumRounds()` Gets the number of rounds in this battle
`RobotSpecification[]` | `getRobots()` Gets the robots participating in this battle

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BattleSpecification

    public BattleSpecification(int numRounds,
                               BattlefieldSpecification battlefield,
                               RobotSpecification[] robotSpecifications)

  Creates a BattleSpecification with the given number of rounds, battlefield, and robots inactivityTime defaults to 450. gunCoolingRate defaults to .1

  Parameters:
    `numRounds` - Number of rounds in this battle
    `battlefield` - The battlefield
    `robotSpecifications` - Robots in this battle

### BattleSpecification

    public BattleSpecification(int numRounds,
                               long inactivityTime,
                               double gunCoolingRate,
                               BattlefieldSpecification battlefield,
                               RobotSpecification[] robots)

  Creates a BattleSpecification with the given number of rounds, inactivityTime, gunCoolingRate, battlefield, and robots

  Parameters:
    `numRounds` - Number of rounds in this battle
    `inactivityTime` - Number of ticks in which 10 energy must be lost
    `gunCoolingRate` - Gun cooling rate
    `battlefield` - The battlefield
    `robots` - Robots in this battle

Method Detail

### getInactivityTime

    public long getInactivityTime()

  Gets the inactivityTime for this battle

  Returns:
    the inactivityTime for this battle

### getGunCoolingRate

    public double getGunCoolingRate()

  Gets the gunCoolingRate for this battle

  Returns:
    the gunCoolingRate for this battle

### getBattlefield

    public BattlefieldSpecification getBattlefield()

  Gets the battleField for this battle

  Returns:
    the battleField for this battle

### getNumRounds

    public int getNumRounds()

  Gets the number of rounds in this battle

  Returns:
    the number of rounds in this battle

### getRobots

    public RobotSpecification[] getRobots()

  Gets the robots participating in this battle

  Returns:
    the robots participating in this battle

### getBattleProperties

    @Deprecated
    public robocode.battle.BattleProperties getBattleProperties()

  Deprecated.

  Used by Robocode, you do not need to use this. This method may not exist in a future version of Robocode.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD