CTFTNKS Project Documentation - v1.3.0
    Preparing search index...

    Data Structure for the global state of the website. Manages players, game instances, and settings persistence.

    Index

    Constructors

    Properties

    canvas?: Canvas
    editingKeymap: boolean = false
    game?: Game
    GameID: number = 0
    keymaps: string[][] = ...

    Default keymaps using modern KeyboardEvent.code strings. order: up, left, down, right, fire

    players: Player[] = []

    Methods

    • Creates a new player or bot and adds it to the store.

      Parameters

      • isBot: boolean = false

        Whether the player should be a bot.

      Returns Player

      The newly created player.

    • Initializes default players if none exist.

      Returns void

    • Loads settings from localStorage if available.

      Returns void