# CommandPhase | pokemon-rogue-battle
Documentation for pokemon-rogue-battle

# Class CommandPhase

#### Hierarchy (View Summary)

- FieldPhase
  - CommandPhase

- Defined in src/phases/command-phase.ts:27

##### Index

### Constructors

constructor

### Properties

fieldIndex

### Methods

cancel
end
executeForAll
getFieldIndex
getPokemon
handleCommand
hideEnemyTrainer
showEnemyTrainer
start

## Constructors

### constructor

- new CommandPhase(fieldIndex: number): CommandPhase

  #### Parameters

  - fieldIndex: number

  #### Returns CommandPhase

  Overrides FieldPhase.constructor

  - Defined in src/phases/command-phase.ts:30

## Properties

### `Protected` fieldIndex

fieldIndex: number

- Defined in src/phases/command-phase.ts:28

## Methods

### cancel

- cancel(): void

  #### Returns void

  - Defined in src/phases/command-phase.ts:457

### end

- end(): void

  #### Returns void

  Overrides FieldPhase.end

  - Defined in src/phases/command-phase.ts:473

### executeForAll

- executeForAll(func: PokemonFunc): void

  #### Parameters

  - func: PokemonFunc

  #### Returns void

  Inherited from FieldPhase.executeForAll

  - Defined in src/phases/field-phase.ts:8

### getFieldIndex

- getFieldIndex(): number

  #### Returns number

  - Defined in src/phases/command-phase.ts:465

### getPokemon

- getPokemon(): PlayerPokemon

  #### Returns PlayerPokemon

  - Defined in src/phases/command-phase.ts:469

### handleCommand

- handleCommand(command: Command , cursor: number, ...args: any[]): boolean

  #### Parameters

  - command: Command
  - cursor: number
  - ...args: any[]

  #### Returns boolean

  - Defined in src/phases/command-phase.ts:146

### hideEnemyTrainer

- hideEnemyTrainer(): void

  #### Returns void

  Inherited from FieldPhase.hideEnemyTrainer

  - Defined in src/phases/battle-phase.ts:37

### showEnemyTrainer

- showEnemyTrainer(trainerSlot?: TrainerSlot ): void

  #### Parameters

  - trainerSlot: TrainerSlot = TrainerSlot.NONE

  #### Returns void

  Inherited from FieldPhase.showEnemyTrainer

  - Defined in src/phases/battle-phase.ts:10

### start

- start(): void

  #### Returns void

  Overrides FieldPhase.start

  - Defined in src/phases/command-phase.ts:36