PlayerInit beta
Interface of @v12-engine/engine
ts
export interface PlayerInitWhat a Player is made from: its id, name, team, colour, starting resources and role
Members
color
ts
color: [number, number, number];RGB, 0..1
creeps
ts
creeps?: boolean;The player the creeps belong to: hostile to everyone, and not someone who can win or lose
id
ts
id: PlayerId;The player's id, by which units, commands and the world's lists name them
name
ts
name: string;The name shown for the player on scores, in the lobby and in messages
neutral
ts
neutral?: boolean;Neutral players own things like gold mines. Nobody is hostile towards them
race
ts
race?: string;The race they play (Rules.races), or random for one drawn as the game starts. The game's first when left out, in a game with races; none for the neutral players and the creeps
resources
ts
resources?: Purse;What the player starts with, by resource id
team
ts
team: number;Players on the same team are allies and share vision