Documentation

Game
in package

Table of Contents

Constants

GAME_TYPE_DEFAULT  = 0
GAME_TYPE_DRAFT  = 5
GAME_TYPE_FFA  = 6
GAME_TYPE_HUNTER_WARS  = 3
GAME_TYPE_NEWBIE  = 7
GAME_TYPE_SEMI_WARS  = 4
GAME_TYPES  = [self::GAME_TYPE_DEFAULT => 'Default', self::GAME_TYPE_HUNTER_WARS => 'Hunter Wars', self::GAME_TYPE_SEMI_WARS => 'Semi Wars', self::GAME_TYPE_DRAFT => 'Draft', self::GAME_TYPE_FFA => 'FFA', self::GAME_TYPE_NEWBIE => 'Newbie']

Properties

$allianceMaxPlayers  : int
$allianceMaxVets  : int
$CACHE_GAMES  : array<int, self>
$creditsNeeded  : int
$description  : string
$destroyPorts  : bool
$enabled  : bool
$endTime  : int
$gameID  : int
$gameSpeed  : float
$gameTypeID  : int
$hasChanged  : bool
$ignoreStats  : bool
$isNew  : bool
$joinTime  : int
$maxPlayers  : int
$maxTurns  : int
$name  : string
$playableRaceIDs  : array<string|int, int>
$startingCredits  : int
$startTime  : int
$startTurnHours  : int
$totalPlayers  : int

Methods

canDestroyPorts()  : bool
clearCache()  : void
createGame()  : self
equals()  : bool
gameExists()  : bool
Attempts to construct the game to determine if it exists.
getAllianceMaxPlayers()  : int
getAllianceMaxVets()  : int
getCreditsNeeded()  : int
getDescription()  : string
getDisplayName()  : string
getEndTime()  : int
Returns the epoch time when the game ends.
getGalaxies()  : array<int, Galaxy>
getGame()  : self
getGameID()  : int
getGameSpeed()  : float
getGameType()  : string
getJoinTime()  : int
Returns the epoch time when players can begin to join the game.
getLastSectorID()  : int
getMaxPlayers()  : int
getMaxTurns()  : int
getName()  : string
getNumberOfGalaxies()  : int
getPlayableRaceIDs()  : array<string|int, int>
Get the list of playable Race IDs based on which Racial HQ's are locations in this game.
getStartingCredits()  : int
getStartTime()  : int
Returns the epoch time when the game starts, i.e. when players can move, turns are gained, etc.
getStartTurnHours()  : int
getTotalPlayers()  : int
hasEnded()  : bool
hasStarted()  : bool
isEnabled()  : bool
isGameType()  : bool
isIgnoreStats()  : bool
save()  : void
saveGames()  : void
setAllianceMaxPlayers()  : void
setAllianceMaxVets()  : void
setCreditsNeeded()  : void
setDescription()  : void
setDestroyPorts()  : void
setEnabled()  : void
setEndTime()  : void
setGameSpeed()  : void
setGameTypeID()  : void
setIgnoreStats()  : void
setJoinTime()  : void
setMaxPlayers()  : void
setMaxTurns()  : void
setName()  : void
setStartingCredits()  : void
setStartingRelations()  : void
Set the starting political relations between races.
setStartTime()  : void
setStartTurnHours()  : void
timeUntilShipUnlock()  : int
Returns the time (in seconds) until restricted ships are unlocked.
__construct()  : mixed

Constants

GAME_TYPE_DEFAULT

public mixed GAME_TYPE_DEFAULT = 0

GAME_TYPE_DRAFT

public mixed GAME_TYPE_DRAFT = 5

GAME_TYPE_FFA

public mixed GAME_TYPE_FFA = 6

GAME_TYPE_HUNTER_WARS

public mixed GAME_TYPE_HUNTER_WARS = 3

GAME_TYPE_NEWBIE

public mixed GAME_TYPE_NEWBIE = 7

GAME_TYPE_SEMI_WARS

public mixed GAME_TYPE_SEMI_WARS = 4

GAME_TYPES

public mixed GAME_TYPES = [self::GAME_TYPE_DEFAULT => 'Default', self::GAME_TYPE_HUNTER_WARS => 'Hunter Wars', self::GAME_TYPE_SEMI_WARS => 'Semi Wars', self::GAME_TYPE_DRAFT => 'Draft', self::GAME_TYPE_FFA => 'FFA', self::GAME_TYPE_NEWBIE => 'Newbie']

Properties

$allianceMaxPlayers

protected int $allianceMaxPlayers

$allianceMaxVets

protected int $allianceMaxVets

$CACHE_GAMES

protected static array<int, self> $CACHE_GAMES = []

$creditsNeeded

protected int $creditsNeeded

$description

protected string $description

$destroyPorts

protected bool $destroyPorts

$enabled

protected bool $enabled

$endTime

protected int $endTime

$gameID read-only

protected int $gameID

$gameSpeed

protected float $gameSpeed

$gameTypeID

protected int $gameTypeID

$hasChanged

protected bool $hasChanged = false

$ignoreStats

protected bool $ignoreStats

$isNew

protected bool $isNew = false

$joinTime

protected int $joinTime

$maxPlayers

protected int $maxPlayers

$maxTurns

protected int $maxTurns

$name

protected string $name

$playableRaceIDs

protected array<string|int, int> $playableRaceIDs

$startingCredits

protected int $startingCredits

$startTime

protected int $startTime

$startTurnHours

protected int $startTurnHours

$totalPlayers

protected int $totalPlayers

Methods

canDestroyPorts()

public canDestroyPorts() : bool
Return values
bool

clearCache()

public static clearCache() : void

createGame()

public static createGame(int $gameID) : self
Parameters
$gameID : int
Return values
self

equals()

public equals(self $otherGame) : bool
Parameters
$otherGame : self
Return values
bool

gameExists()

Attempts to construct the game to determine if it exists.

public static gameExists(int $gameID) : bool
Parameters
$gameID : int
Return values
bool

getAllianceMaxPlayers()

public getAllianceMaxPlayers() : int
Return values
int

getAllianceMaxVets()

public getAllianceMaxVets() : int
Return values
int

getCreditsNeeded()

public getCreditsNeeded() : int
Return values
int

getDescription()

public getDescription() : string
Return values
string

getDisplayName()

public getDisplayName() : string
Return values
string

getEndTime()

Returns the epoch time when the game ends.

public getEndTime() : int
Return values
int

getGalaxies()

public getGalaxies() : array<int, Galaxy>
Return values
array<int, Galaxy>

getGame()

public static getGame(int $gameID[, bool $forceUpdate = false ]) : self
Parameters
$gameID : int
$forceUpdate : bool = false
Return values
self

getGameID()

public getGameID() : int
Return values
int

getGameSpeed()

public getGameSpeed() : float
Return values
float

getGameType()

public getGameType() : string
Return values
string

getJoinTime()

Returns the epoch time when players can begin to join the game.

public getJoinTime() : int
Return values
int

getLastSectorID()

public getLastSectorID() : int
Return values
int

getMaxPlayers()

public getMaxPlayers() : int
Return values
int

getMaxTurns()

public getMaxTurns() : int
Return values
int

getName()

public getName() : string
Return values
string

getNumberOfGalaxies()

public getNumberOfGalaxies() : int
Return values
int

getPlayableRaceIDs()

Get the list of playable Race IDs based on which Racial HQ's are locations in this game.

public getPlayableRaceIDs() : array<string|int, int>
Return values
array<string|int, int>

getStartingCredits()

public getStartingCredits() : int
Return values
int

getStartTime()

Returns the epoch time when the game starts, i.e. when players can move, turns are gained, etc.

public getStartTime() : int
Return values
int

getStartTurnHours()

public getStartTurnHours() : int
Return values
int

getTotalPlayers()

public getTotalPlayers() : int
Return values
int

hasEnded()

public hasEnded() : bool
Return values
bool

hasStarted()

public hasStarted() : bool
Return values
bool

isEnabled()

public isEnabled() : bool
Return values
bool

isGameType()

public isGameType(int $gameTypeID) : bool
Parameters
$gameTypeID : int
Return values
bool

isIgnoreStats()

public isIgnoreStats() : bool
Return values
bool

save()

public save() : void

saveGames()

public static saveGames() : void

setAllianceMaxPlayers()

public setAllianceMaxPlayers(int $int) : void
Parameters
$int : int

setAllianceMaxVets()

public setAllianceMaxVets(int $int) : void
Parameters
$int : int

setCreditsNeeded()

public setCreditsNeeded(int $creditsNeeded) : void
Parameters
$creditsNeeded : int

setDescription()

public setDescription(string $description) : void
Parameters
$description : string

setDestroyPorts()

public setDestroyPorts(bool $destroyPorts) : void
Parameters
$destroyPorts : bool

setEnabled()

public setEnabled(bool $bool) : void
Parameters
$bool : bool

setEndTime()

public setEndTime(int $endTime) : void
Parameters
$endTime : int

setGameSpeed()

public setGameSpeed(float $gameSpeed) : void
Parameters
$gameSpeed : float

setGameTypeID()

public setGameTypeID(int $gameTypeID) : void
Parameters
$gameTypeID : int

setIgnoreStats()

public setIgnoreStats(bool $bool) : void
Parameters
$bool : bool

setJoinTime()

public setJoinTime(int $joinTime) : void
Parameters
$joinTime : int

setMaxPlayers()

public setMaxPlayers(int $maxPlayers) : void
Parameters
$maxPlayers : int

setMaxTurns()

public setMaxTurns(int $int) : void
Parameters
$int : int

setName()

public setName(string $name) : void
Parameters
$name : string

setStartingCredits()

public setStartingCredits(int $int) : void
Parameters
$int : int

setStartingRelations()

Set the starting political relations between races.

public setStartingRelations(int $relations) : void
Parameters
$relations : int

setStartTime()

public setStartTime(int $startTime) : void
Parameters
$startTime : int

setStartTurnHours()

public setStartTurnHours(int $int) : void
Parameters
$int : int

timeUntilShipUnlock()

Returns the time (in seconds) until restricted ships are unlocked.

public timeUntilShipUnlock() : int
Return values
int

__construct()

protected __construct(int $gameID[, bool $create = false ]) : mixed
Parameters
$gameID : int
$create : bool = false

        
On this page

Search results