Type Alias: LockstepCommand<Input>
ts
type LockstepCommand<Input> =
| {
k: "t";
}
| {
k: "i";
d: Input;
}
| {
k: "h";
n: number;
h: string;
};Defined in: server/lockstep.ts:17
What a LockstepClient sends: an input (i), its simulation's hash after turn n (h), or, to a room whose turnClock is "players", a request to close the turns that are due (t).
Type Parameters
| Type Parameter |
|---|
Input |
Union Members
Type Literal
ts
{
k: "t";
}| Name | Type | Description | Defined in |
|---|---|---|---|
k | "t" | A request to close the turns that are due. | server/lockstep.ts:20 |
Type Literal
ts
{
k: "i";
d: Input;
}| Name | Type | Description | Defined in |
|---|---|---|---|
k | "i" | An input. | server/lockstep.ts:24 |
d | Input | The input, before parseInput. | server/lockstep.ts:26 |
Type Literal
ts
{
k: "h";
n: number;
h: string;
}| Name | Type | Description | Defined in |
|---|---|---|---|
k | "h" | A hash of the client's simulation. | server/lockstep.ts:30 |
n | number | The turn the simulation was at. | server/lockstep.ts:32 |
h | string | The hash. | server/lockstep.ts:34 |