feat(js): m10 extensions (pause, restart, speed-up via Frame) with tests
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
25141ce86d
commit
fd7c5f2acf
+2
-1
@@ -2,7 +2,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,
|
||||
* m09: `ArrowUp`/`w`/`W` -> `Action.Turn('Up')`, `ArrowDown`/`s`/`S` -> Down, `ArrowLeft`/`a`/`A` -> Left,
|
||||
* `ArrowRight`/`d`/`D` -> Right. Any other key -> `null`.
|
||||
* (m10) `' '` (Space) -> `Action.TogglePause`, `r`/`R` -> `Action.Restart`.
|
||||
*/
|
||||
export const keyToAction = (key) => todo('m09')
|
||||
|
||||
Reference in New Issue
Block a user