'use strict';

/** @namespace */
/**
 * Values for Game state.
 *
 * @typedef {'0_INIT' | '1_SELECT_DRAFT' | '1_SELECT_FACTION' | '1_SELECT_TOURNAMENT' | '2_CHANGE_UP_TO_3_CARDS'} TH_GameStateEnum
 */
/**
 * Values For Deck Mode.
 *
 * @typedef {'faction' | 'draft' | 'tournament'} TH_DeckMode
 */
/**
 * Faction of a hero
 *
 * @typedef {'orcs' | 'humans' | 'elves' | 'meca' | 'none'} TH_Faction
 */
/**
 * popularity attribute of a hero
 *
 * @typedef {'with' | 'without' | 'any'} TH_Popularity
 */
/**
 * player colors
 *
 * @typedef {'blue' | 'red'} TH_Color
 */
/**
 * Possible advanced rules
 *
 * @typedef {'popularity' | 'discard'} TH_AdvRule
 */
/**
 * Possible action for a hero
 *
 * @typedef {'recruit' | 'deploy' | 'move' | 'ability' | 'dismiss' | 'discard' | 'replace'} TH_HeroAction
 */
/**
 * Possible position for a hero
 *
 * @typedef {'Pile' | 'Hand' | 'Discard' | 'Camp' | 'BattleLeft' | 'BattleCenter' | 'BattleRight'} TH_HeroPosition
 */
/**
 * Ability Hook
 *
 * @typedef {'AfterDeploy' | 'AfterDiscard' | 'AfterRecruit' | 'BeforeControl' | 'BeforeMaintenance' | 'BeforeMilitary'} TH_AbilityHook
 */
/**
 * Ability of an Hero
 *
 * @typedef {object} TH_Ability
 * @property {string} name - name of the ability
 * @property {TH_AbilityHook} hook - when ability has an effect
 * @property {boolean} isOptionnal - If true, player will have choice wether to activate ability or not
 * @property {string} desc - Description of the ability effect
 */
/**
 * Hero card
 *
 * @typedef {object} TH_HeroCard
 * @property {number} id - unique ID of hero
 * @property {string} name - name of hero
 * @property {number} cost - cost of hero
 * @property {number} power - power of hero
 * @property {TH_Faction} faction - faction of hero
 * @property {TH_Popularity} popularity - popularity attribute of hero
 * @property {boolean} isDraftable - Is hero available in Draft mode
 * @property {TH_Ability} ability - Ability of a hero
 * @property {Array<TH_HeroAction>} possibleActions - Actions possible on hero
 *
 */
/**
 * Battle Tile object
 *
 * @typedef {object} TH_BattleTile
 * @property {number} id - unique ID of tile
 * @property {string} name - name of tile
 * @property {number} victoryPoints - Number of victory points
 * @property {number} victories/blue - Number of red player victories
 * @property {number} victories/red - Number of blue player victories
 *
 */
/**
 * One game global state
 *
 * @typedef {object} TH_GameGlobalState
 * @property {TH_GameStateEnum} gameState - Current status of the game
 * @property {Array<TH_HeroCard>} allHeroes - Array containing all heroes
 * @property {TH_DeckMode} deckMode - Deck mode of the game
 * @property {Array<TH_AdvRule>} advRules - Array describing the active advandced rules, if any
 * @property {boolean} waitingFor/blue - If true, we are waiting for blue to play
 * @property {boolean} waitingFor/red - If true, we are waiting for red to play
 * @property {TH_Color | 'both'} currentPlayer - Who is current player, can be 'both'
 * @property {Array<TH_BattleTile>} battleTiles/left/ofBlue - Battle tiles on left side of blue player
 * @property {Array<TH_BattleTile>} battleTiles/center/ofBlue - Battle tiles on center of blue player
 * @property {Array<TH_BattleTile>} battleTiles/right/ofBlue - Battle tiles on right side of blue player
 * @property {number} totalFood - Total food available for players to take
 * @property {string} allHeroesJson - All heroes in JSON format (read from a JSON file)
 * @property {TH_Color | 'both'} updatePlayerState - if set, update player state accordingly
 */

/**
 * Possible actions for a player
 *
 * @typedef {object} TH_PlayerActions
 * @property {number} canDrawCards - Player can draw a number of cards
 * @property {boolean} canPass - If true, player can pass his turn
 * @property {boolean} canEndTurn - If true, player can end his turn. Otherwise he must perform some action(s)
 */
/**
 * Game state for one player
 *
 * @typedef {object} TH_PlayerGameState
 * @property {string} name - username of this player
 * @property {TH_Color} color - color of the player
 * @property {TH_Faction|''} faction - Chosen faction (empty if not playing faction mode)
 * @property {Array<number>} draftHeroesIds - Will contain the IDs of the heroes selectable for draft and tournament mode
 * @property {Array<TH_HeroCard>} twelveHeroes - The 12 Heroes cards used by player
 * @property {Array<number>} heroesInPile - The heroes in player pile
 * @property {Array<number>} heroesInHand - The heroes in player hand
 * @property {Array<number>} heroesInDiscard - The heroes in discard pile
 * @property {Array<number>} heroesInCamp - The heroes in player camp (recruited)
 * @property {Array<number>} heroesInBattleLeft - The heroes in left battle field (deployed)
 * @property {Array<number>} heroesInBattleCenter - The heroes in center battle field (deployed)
 * @property {Array<number>} heroesInBattleRight - The heroes in right battle field (deployed)
 * @property {number} foodInCamp - Number of food in camp
 * @property {number} foodInBattle/left - Food on left battle field
 * @property {number} foodInBattle/center - Food on center battle field
 * @property {number} foodInBattle/right - Food on right battle field
 * @property {Array<object>} actionsPerformed - During military phase it will contain actions made by player to be replayed by other
 * @property {TH_PlayerActions} playerAvailActions - Actions avalaible for the player
 * @property {string} instructions - Instructions to the player
 *
 */
/**
 * Game Data Store
 *
 * @typedef {object} TH_GameDataStore
 * @property {TH_GameGlobalState} game - The game global state in store
 * @property {TH_PlayerGameState} bluePlayer - The game state for blue player
 * @property {TH_PlayerGameState} redPlayer - The game state for red player
 */

exports.unused = {};
