Options
All
  • Public
  • Public/Protected
  • All
Menu

Module view/actions/index

This file contains shared functionality for action button components in this directory.

Type aliases

ActionButtonProps

ActionButtonProps: ButtonProps & object

React props for action buttons

Functions

Const checkPlayerCooldown

  • checkPlayerCooldown(player: PlayerInfo | undefined, block: BlockInfo | undefined): undefined | false | true
  • Helper function returning whether the given player can perform a new action or he must still wait because of the previous action.

    Parameters

    • player: PlayerInfo | undefined

      Player whose state is requested

    • block: BlockInfo | undefined

      Last mined block

    Returns undefined | false | true

Const isGamePhase

  • isGamePhase(block: BlockInfo | undefined): boolean
  • Helper function returning whether current phase is GAME or not

    Parameters

    • block: BlockInfo | undefined

      Last mined block

    Returns boolean

Const isInitPhase

  • isInitPhase(block: BlockInfo | undefined): boolean
  • Helper function returning whether current phase is INIT or not

    Parameters

    • block: BlockInfo | undefined

      Last mined block

    Returns boolean

Const isPlayerRegistered

  • isPlayerRegistered(player: PlayerInfo | undefined, block: BlockInfo | undefined): undefined | false | true
  • Helper function returning whether the given player is registered in current game turn or not

    Parameters

    • player: PlayerInfo | undefined

      Player whose state is requested

    • block: BlockInfo | undefined

      Last mined block

    Returns undefined | false | true

Generated using TypeDoc