Spaces:
Running
Running
| export function parseCommand(text) { | |
| const t = text.toLowerCase(); | |
| if (t.includes("fractal")) { | |
| return packet("world", { power: 8.0 }); | |
| } | |
| if (t.includes("stronger")) { | |
| return packet("world", { power: 12.0 }); | |
| } | |
| if (t.includes("reset")) { | |
| return packet("system", { reset: true }); | |
| } | |
| return packet("control", { raw: text }); | |
| } | |
| function packet(lane, payload) { | |
| return { | |
| lane, | |
| payload, | |
| timestamp: performance.now() | |
| }; | |
| } |