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

    Class Bot

    A bot player that controls a tank automatically.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new Bot.

      Parameters

      • id: number

        The player ID.

      • name: string

        The bot name.

      • team: Team

        The team of the bot.

      Returns Bot

    Properties

    base?: Base

    The home base of the player's team (if applicable to the game mode).

    game?: Game

    The current game instance this player is associated with.

    id: number

    The player ID.

    keys: string[]

    The key mapping.

    name: string

    The player name.

    score: number = 0

    Cumulative score for the current round.

    spree: number = 0

    Number of kills without dying. Triggers "Killing Spree" sound at certain thresholds.

    stats: { deaths: number; kills: number; miles: number; shots: number } = ...

    Persistent statistics for the player across games.

    team: Team

    The team of the player

    Methods

    • Updates the bot's state.

      Parameters

      • tank: Tank

        the tank to be steered by the player

      • dt: number

        the time elapsed since the last frame in milliseconds

      Returns void