JavaScript Bot example for UI challenge
- Game rules
- Registration page
- Bot example (this source code)
Following steps will execute demo bot in browser and will connect it to game server
- Copy game URL and replace it in .env file
- Install NodeJS
- Install dependencies:
npm install
- Start test page:
npm run start
- Open browser in http://localhost:PORT/
Open /src/bot.js file and replace example code with your own
function getNextSnakeMove(board) {
// Your code goes here
}