GithubHelp home page GithubHelp logo

xtagon / board Goto Github PK

View Code? Open in Web Editor NEW

This project forked from battlesnakeofficial/board

0.0 1.0 0.0 2.4 MB

Battlesnake Game Board and Playback Control

Home Page: https://play.battlesnake.com

License: GNU Affero General Public License v3.0

Dockerfile 0.21% Shell 1.25% CSS 4.11% HTML 0.65% JavaScript 93.78%

board's Introduction

Battlesnake Board

Build Status

Development

npm i
npm start

Production

npm run build

Running a game

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.

Board parameters

Required

  • 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]

Optional

  • 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.

Keyboard Shortcuts

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.

Linting and formatting

ESLint and Prettier are setup in this project so you may want to install compatible plugins in your editor.

board's People

Contributors

bean0b avatar brandonb927 avatar bvanvugt avatar chris-bsnake avatar codeallthethingz avatar colinjfw avatar dependabot[bot] avatar dlsteuer avatar graeme-hill avatar hanneskuettner avatar louisritchie avatar nbw avatar weekendwarrior1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.