add generic stateful input streaming
All checks were successful
build / image (push) Successful in 50s

This commit is contained in:
Syncer Deploy
2026-08-28 11:27:53 -03:00
parent 0bf2b95755
commit 96b73922cc
15 changed files with 767 additions and 81 deletions

View File

@@ -22,12 +22,16 @@ test("Flux Relay is a complete game defined through the public authoring API", (
const server = fluxGame.createServer();
server.addPlayer(1);
assert.deepEqual(server.submitInput(1, createThrustPacket(1, 1)), {
const thrustPacket = createThrustPacket(1, 1);
assert.deepEqual(server.submitInput(1, thrustPacket), {
accepted: true,
});
const events = [];
for (let tick = 0; tick < 180; tick += 1) {
if (tick > 0 && tick % 6 === 0) {
assert.deepEqual(server.submitInput(1, thrustPacket), { accepted: true });
}
events.push(...server.step().events);
}