## Global

### Members

#### constant getDraftSets
`server/src/client-server-shared/heroesHelper.js`, `line 78`

  Get draft sets to play draft mode

#### constant getHeroesIdsByFaction
`server/src/client-server-shared/heroesHelper.js`, `line 50`

  Get 12 heroes id by faction in random order.

#### constant shuffleHeroes
`server/src/client-server-shared/heroesHelper.js`, `line 107`

  Shuffle Heroes

#### TH_Ability :object
`server/src/client-server-shared/type/game.js`, `line 49`

  Ability of an Hero

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `name` | string | name of the ability
  `hook` | TH_AbilityHook | when ability has an effect
  `isOptionnal` | boolean | If true, player will have choice wether to activate ability or not
  `desc` | string | Description of the ability effect

#### TH_AbilityHook :'AfterDeploy'|'AfterDiscard'|'AfterRecruit'|'BeforeControl'|'BeforeMaintenance'|'BeforeMilitary'
`server/src/client-server-shared/type/game.js`, `line 44`

  Ability Hook

#### TH_AdvRule :'popularity'|'discard'
`server/src/client-server-shared/type/game.js`, `line 29`

  Possible advanced rules

#### TH_BattleTile :object
`server/src/client-server-shared/type/game.js`, `line 72`

  Battle Tile object

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `id` | number | unique ID of tile
  `name` | string | name of tile
  `victoryPoints` | number | Number of victory points
  `victories/blue` | number | Number of red player victories
  `victories/red` | number | Number of blue player victories

#### TH_Color :'blue'|'red'
`server/src/client-server-shared/type/game.js`, `line 24`

  player colors

#### TH_CommStatus :object
`server/src/client-server-shared/type/comm.js`, `line 9`

  Comm status

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `status` | TH_ReqStatus | Status of the request
  `text` | string | Text describing current status

#### TH_DeckMode :'faction'|'draft'|'tournament'
`server/src/client-server-shared/type/game.js`, `line 9`

  Values For Deck Mode.

#### TH_Faction :'orcs'|'humans'|'elves'|'meca'|'none'
`server/src/client-server-shared/type/game.js`, `line 14`

  Faction of a hero

#### TH_GameDataStore :object
`server/src/client-server-shared/type/game.js`, `line 131`

  Game Data Store

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `game` | TH_GameGlobalState | The game global state in store
  `bluePlayer` | TH_PlayerGameState | The game state for blue player
  `redPlayer` | TH_PlayerGameState | The game state for red player

#### TH_GameGlobalState :object
`server/src/client-server-shared/type/game.js`, `line 83`

  One game global state

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `gameState` | TH_GameStateEnum | Current status of the game
  `allHeroes` | Array.<TH_HeroCard> | Array containing all heroes
  `deckMode` | TH_DeckMode | Deck mode of the game
  `advRules` | Array.<TH_AdvRule> | Array describing the active advandced rules, if any
  `waitingFor/blue` | boolean | If true, we are waiting for blue to play
  `waitingFor/red` | boolean | If true, we are waiting for red to play
  `currentPlayer` | TH_Color | 'both' | Who is current player, can be 'both'
  `battleTiles/left/ofBlue` | Array.<TH_BattleTile> | Battle tiles on left side of blue player
  `battleTiles/center/ofBlue` | Array.<TH_BattleTile> | Battle tiles on center of blue player
  `battleTiles/right/ofBlue` | Array.<TH_BattleTile> | Battle tiles on right side of blue player
  `totalFood` | number | Total food available for players to take
  `allHeroesJson` | string | All heroes in JSON format (read from a JSON file)

#### TH_GameStateEnum :'0_INIT'|'1_SELECT_DRAFT'|'1_SELECT_FACTION'|'1_SELECT_TOURNAMENT'|'2_CHANGE_UP_TO_3_CARDS'
`server/src/client-server-shared/type/game.js`, `line 4`

  Values for Game state.

#### TH_HeroAction :'recruit'|'deploy'|'move'|'ability'|'dismiss'|'discard'|'replace'
`server/src/client-server-shared/type/game.js`, `line 34`

  Possible action for a hero

#### TH_HeroCard :object
`server/src/client-server-shared/type/game.js`, `line 58`

  Hero card

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `id` | number | unique ID of hero
  `name` | string | name of hero
  `cost` | number | cost of hero
  `power` | number | power of hero
  `faction` | TH_Faction | faction of hero
  `popularity` | TH_Popularity | popularity attribute of hero
  `isDraftable` | boolean | Is hero available in Draft mode
  `ability` | TH_Ability | Ability of a hero

#### TH_HeroInGame :object
`server/src/client-server-shared/type/game.js`, `line 100`

  Hero in game

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `id` | number | unique ID of hero
  `position` | TH_HeroPosition | position of hero in game
  `possibleActions` | Array.<TH_HeroAction> | Actions possible on hero

#### TH_HeroPosition :'pile'|'hand'|'discard'|'camp'|'battle_left'|'battle_center'|'battle_right'
`server/src/client-server-shared/type/game.js`, `line 39`

  Possible position for a hero

#### TH_MessageChatFrom :object
`server/src/client-server-shared/type/comm.js`, `line 40`

  Message for chat from one player to others

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `from` | string | From is the message from
  `text` | string | The content of chat message

#### TH_MessageDraftStep :object
`server/src/client-server-shared/type/comm.js`, `line 24`

  Message from player for draft mode steps. Each turn of draft mode, players choses 2 new Ids which will be added to his twelveHeroes.

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `color` | TH_Color | color of player
  `chosenIds` | Array.<number> | The chosen Ids

#### TH_MessageFaction :object
`server/src/client-server-shared/type/comm.js`, `line 17`

  Message from player with faction selected

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `color` | TH_Color | color of player
  `faction` | TH_Faction | The chosen faction

#### TH_MessageTournamentDeckStep :object
`server/src/client-server-shared/type/comm.js`, `line 32`

  Message from player for tournament mode. Player chose 12 heroes.

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `color` | TH_Color | color of player
  `twelveHeroesIds` | Array.<number> | The chosen 12 heroes IDs

#### TH_PlayerAction :'supply'|'pass'
`server/src/client-server-shared/type/game.js`, `line 109`

  Possible action for a player

#### TH_PlayerGameState :object
`server/src/client-server-shared/type/game.js`, `line 114`

  Game state for one player

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `name` | string | username of this player
  `color` | TH_Color | color of the player
  `faction` | TH_Faction | '' | Chosen faction (empty if not playing faction mode)
  `draftHeroesIds` | Array.<number> | Will contain the IDs of the heroes selectable for draft mode
  `twelveHeroes` | Array.<TH_HeroInGame> | The 12 Heroes used by player
  `foodInCamp` | number | Number of food in camp
  `foodInBattle/left` | number | Food on left battle field
  `foodInBattle/center` | number | Food on center battle field
  `foodInBattle/right` | number | Food on right battle field
  `actionsPerformed` | Array.<object> | During military phase it will contain actions made by player to be replayed by other
  `` | Array.<TH_PlayerAction> | Actions avalaible for the player

#### TH_Popularity :'with'|'without'|'any'
`server/src/client-server-shared/type/game.js`, `line 19`

  popularity attribute of a hero

#### TH_ReqStatus :'idle'|'requested'|'success'|'error'
`server/src/client-server-shared/type/comm.js`, `line 4`

  Statuses of a server Request