BotTurn
One of a room bot’s moves, as a scene’s play reads it: her player,
what it controls, her input and her messages, so a bot plays a card
game with no character as well as a shooter.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
character |
Entity | null |
Her character among them, the one with a character’s pose, or null where she controls none, as in a card game. |
controlled |
readonly Entity[] |
Every entity her player controls, as the room last told her, in the order they were spawned. |
input |
BotInput |
Her input for the ticks to her next move. |
moveSeconds |
number |
Seconds of the room’s time since her last move: one of the room’s send intervals, since she moves on each of its sends. A speed read from two moves divides by it. |
player |
Entity | null |
Her player entity in it: null before the stream brings it. |
send |
(name, payload?, options?) => void |
Sends the room one of the game’s commands, by its plugin.key name: what a page’s button or key sends, each entity field as the key the dump files the entity under. A command declared entity: true names the entity it acts through in entity, one of controlled, such as her character: a room’s bot knows no declaration, so it sends none it is not given. Its result comes to her page as any command’s does. |
world |
World |
The room’s world as her page’s stream holds it: every entity the room streams, with the game’s own traits. |