- Keyboard: use WASD or Arrow-Keys to change the direction of the Snake
- Touch: tap the area of the screen in which direction the snake should go
You can customize the map by clicking the edit button (top-left-corner)
- Left Click to add/delete a border
- When the Snake goes off the map it teleports to the other side (don't forget to open it)
Play against AI Snake
- Use the AI Button to activate the AI opponent
- When the AI opponent is activatet you can switch between 2 Gamemodes (chasing the same or different apple)
- Install the requirements:
pip install -r requirements.txt- Run the main script in the frontend folder:
cd frontendpython3 main.py- Adapt the URL in the webmodel class to your ip and port where you will run the Flask Server:
- It will be the same as in the app.run() method
- Get the build folder of the app in the frontend folder:
cd frontendpython3 -m pygbag --build --ume_block 0 --can_close 1 --title snake --app_name snake main.py- Add this script tag to the this body tag
- Run the Flask Server in the snake folder:
cd ..python3 ./backend/app.py- Run the build command:
docker build -t snake .- Run the run command:
docker run --name snake -p <port>:<port> snake
