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.events
Class BattleStartedEvent

    java.lang.Object
      robocode.control.events.BattleEvent
          robocode.control.events.BattleStartedEvent

    public class BattleStartedEvent

extends BattleEvent

A BattleStartedEvent is sent to `onBattleStarted()` when a new battle is started.

Since:
  1.6.2
Author:
  Pavel Savara (original), Flemming N. Larsen (contributor)
See Also:
  `IBattleListener`, `BattleCompletedEvent`, `BattleFinishedEvent`

Constructor Summary
`BattleStartedEvent(BattleRules battleRules, int robotsCount, boolean isReplay)` Creates a new BattleStartedEvent.

Method Summary
`BattleRules` | `getBattleRules()` Returns the rules that will be used in the battle.
`int` | `getRobotsCount()` Returns the number of robots participating in the battle.
`boolean` | `isReplay()` Checks if this battle is a replay or real battle.

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

Constructor Detail

### BattleStartedEvent

    public BattleStartedEvent(BattleRules battleRules,
                              int robotsCount,
                              boolean isReplay)

  Creates a new BattleStartedEvent.

  Parameters:
    `battleRules` - the rules that will be used in the battle.
    `robotsCount` - the number of robots participating in the battle.
    `isReplay` - a flag specifying if this battle is a replay or real battle: `true` if the battle is a replay; `false` otherwise.

Method Detail

### getBattleRules

    public BattleRules getBattleRules()

  Returns the rules that will be used in the battle.

  Returns:
    the rules that will be used in the battle.

### getRobotsCount

    public int getRobotsCount()

  Returns the number of robots participating in the battle.

  Returns:
    the number of robots participating in the battle.

### isReplay

    public boolean isReplay()

  Checks if this battle is a replay or real battle.

  Returns:
    `true` if the battle is a replay; `false` otherwise.

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

Copyright © 2010 Robocode. All Rights Reserved.