Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GameStats

Helper for accessing the amount of heads and crystals a player has. Those resources are both stored in the playerbase

Hierarchy

  • GameStats

Index

Constructors

constructor

  • Parameters

    • root: any

    Returns GameStats

Methods

addHeads

  • addHeads(amount: any): void
  • Adds the given amount of heads

    Parameters

    • amount: any

    Returns void

canAfford

  • canAfford(cost: any): boolean
  • Checks if we can afford the given cost

    Parameters

    • cost: any

    Returns boolean

computeCrystalsMinusBlueprints

  • computeCrystalsMinusBlueprints(): any
  • Returns the amount of crystals minus the amount required by blueprints

    Returns any

getCrystals

  • getCrystals(): any
  • Returns the amount of crystals

    Returns any

getHeads

  • getHeads(): any
  • Returns the amount of heads

    Returns any

take

  • take(cost: any): void
  • Takes the given cost

    Parameters

    • cost: any

    Returns void