Remove TickType idea

This commit is contained in:
Tangent Wantwight 2020-02-15 13:55:33 -05:00
parent 4c337f3579
commit 21886c00a8

View file

@ -17,18 +17,6 @@ function equals<T extends Equals | string | number>(a: T, b: T): boolean {
return (a as Equals).equals(b as Equals);
}
// TODO: probably an incoherent idea. Instead consider having two state objects,
// a synchronized state object that can be rolled back / predicted, and
// a cosmetic state object that glosses the synchronized state and never rolls back
export const enum TickType {
/// a "canonical" update that will not be rolled back;
/// this must be fully deterministic based on the state and input.
CANON,
/// a "predicted" update that may or may not be rolled back;
/// if possible, avoid changes that could be distracting if rolled back.
PREDICTED,
}
interface LockstepProcessor<Input, State> {
compareInput(a: Input, b: Input): boolean;
cloneState(source: State): State;