Options
All
  • Public
  • Public/Protected
  • All
Menu

The Dimension framework for intiating a Design to then run instances of a Match or {@link Tournament} on.

Hierarchy

  • Dimension

Index

Constructors

constructor

Properties

Private cleaningUp

cleaningUp: Promise<any> = null

Indicator of whether cleanup was called already or not

databasePlugin

databasePlugin: Database

The database plugin being used. Allows Dimensions to interact with a database and store Match, {@link Tournament}, and user data, allowing for data persistance across instances.

design

design: Design

id

id: NanoID

This dimension's ID. It is always a 6 character NanoID unless overrided through the DimensionConfigs

log

log: Logger = new Logger()

Logger

matches

matches: Map<NanoID, Match> = new Map()

A map of the matches running in this Dimension

name

name: string

This Dimension's name

storagePlugin

storagePlugin: Storage

The storage plugin being used. Allows Dimensions to interact with a storage service and store user object data, particuarly bot file uploads

tournaments

tournaments: Map<NanoID, Tournament> = new Map()

A map of the tournaments in this Dimension.

Static Station

Station: Station = null

The Station associated with this Dimension and current node instance

Methods

cleanup

  • cleanup(): Promise<void>

cleanupMatches

  • cleanupMatches(): Promise<Array<void>>

cleanupTournaments

  • cleanupTournaments(): Promise<Array<void>>

createMatch

createTournament

  • createTournament(files: Array<string> | Array<{ existingId?: string; file: string; name: string }>, configs: TournamentConfigsBase): Tournament
  • Create a tournament

    see

    {@link Tournament} for the different tournament types

    Parameters

    • files: Array<string> | Array<{ existingId?: string; file: string; name: string }>

      The initial files to make competitors in this tournament. Can also specify the name and an existingID, which is the playerID. If database is used, this existingID is used to find the assocciated user with this ID.

    • configs: TournamentConfigsBase

      Configuration for the tournament

    Returns Tournament

    a Tournament of the specified type

getStation

hasDatabase

  • hasDatabase(): boolean

hasStorage

  • hasStorage(): boolean

removeMatch

  • removeMatch(matchID: NanoID): Promise<boolean>

runMatch

Private setupSecurity

  • setupSecurity(): void

use

  • use(plugin: Plugin): Promise<void>

Static genDimensionID

  • genDimensionID(): string

Object literals

configs

configs: object

Dimension configs. Set to defaults

activateStation

activateStation: true = true

backingDatabase

backingDatabase: DatabaseType = DatabaseType.NONE

backingStorage

backingStorage: StorageType = StorageType.NONE

createBotDirectories

createBotDirectories: true = true

id

id: string = "oLBptg"

loggingLevel

loggingLevel: INFO = Logger.LEVEL.INFO

name

name: string = ""

observe

observe: true = true

secureMode

secureMode: false = false

stationConfigs

stationConfigs: {}

Type declaration

defaultMatchConfigs

defaultMatchConfigs: object

secureMode

secureMode: false = false

statistics

statistics: object

Stats

matchesCreated

matchesCreated: number = 0

tournamentsCreated

tournamentsCreated: number = 0

Generated using TypeDoc