Skip to main content

Engine Methods

importMethods

Imports methods into shared factory state.

type MethodsObject = {
{ [key]: function | MethodObject}
}

engine.importMethods(methods: MethodsObject, traverse: boolean | string[], maxDepth: number, global?: boolean);

getTournament

engine.getTournament(params?)

getState

engine.getState = (params?) =>

reset

engine.reset();

devContext

engine.devContex(contextCriteria);

getDevContext

engine.getDevContext(contextCriteria);

newTournamentRecord

engine.newTournamentRecord(params);

setState

See Global State

engine.setState(tournamentRecords, deepCopyOption, deepCopyAttributes);

setTournamentId

engine.setTournamentId(tournamentId);

getTournamentId

engine.getTournamentId();

setTournamentRecord

engine.setTournamentRecord();

removeTournamentRecord

engine.removeTournamentRecord(tournamentId);

removeUnlinkedTournamentRecords

engine.removeUnlinkedTournamentRecords();

version

Returns NPM package version. Can be used in configurations that utilize Competition Factory engines on both client and server to ensure equivalency.

const version = engine.version();