feat(js): m09 input, app, runtime, browser, main, index.html and smoke test

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-28 23:53:09 +01:00
co-authored by Claude Sonnet 5.5
parent 584f1d4825
commit 8028bb2fc0
16 changed files with 622 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
import { todo } from './todo.js'
/**
* Translate a keyboard key name (as in `KeyboardEvent.key`) into the game action it triggers, or `null`.
* `ArrowUp`/`w`/`W` -> `Action.Turn('Up')`, `ArrowDown`/`s`/`S` -> Down, `ArrowLeft`/`a`/`A` -> Left,
* `ArrowRight`/`d`/`D` -> Right. Any other key -> `null`.
*/
export const keyToAction = (key) => todo('m09')