npm i
npm start
npm run build
The game board requires a few parameters to work, including a game
ID and an engine
URL to query. Loading the index page with no params will throw an error or spin indefinitely.
engine
- the Battlesnake engine to request frames from.game
- the id of the game to fetch frames for.
http://localhost:3000/?engine=[ENGINE_URL]&game=[GAME_ID]
autoplay
- start game playback immediately. Values true / false. Defaults to false.boardTheme
- the theme of the board. Values dark / light. Defaults to light.frameRate
- the maximum frame rate used for playback. Takes an integer value equal to FPS. Defaults to 20 FPS.hideScoreboard
- remove the scoreboard for embedding cool games. Values true false. Defaults to false.hideMediaControls
- remove the controls for embedding cool games. Values true / false. Defaults to false.loop
- restart playback immediately once game completes. Values true / false. Defaults to false.title
- show a title string on the game board. Takes a string. Defaults to empty string.turn
- load game to a specific turn. Takes an integer. Defaults to 0.
If you click on the board you can use:
- arrow keys to go forwards and backwards through frames.
- space bar to pause / un-pause the game.
- r to reset the game to frame 0.
ESLint and Prettier are setup in this project so you may want to install compatible plugins in your editor.