A digital recreation of the classic board game β Snake and Ladders β built using HTML, CSS, JavaScript, and Python (Flask). This fun and interactive web application supports two-player gameplay, allowing users to roll dice, move pieces, and experience the joy of snakes pulling them down or ladders boosting them up. Fully responsive and playable directly in the browser.
- π₯ Two-Player Gameplay: Take turns rolling the dice with a friend and race to the finish.
- π Snakes & Ladders: Classic mechanics where ladders advance your position and snakes bring you down.
- πΎ Game State Persistence: The game remembers your progress across refreshes and page reloads.
- π± Responsive Design: Smooth gameplay across all screen sizes β mobile, tablet, or desktop.
- π¨ Custom Board: A visually engaging layout with background imagery and styled pieces.
Purpose | Stack |
---|---|
Structure | HTML |
Styling | CSS |
Game Logic | JavaScript |
Backend | Python (Flask) |
Versioning | Git |
-
Clone the repository:
git clone https://github.com/yourusername/snake-and-ladders-game.git cd snake-and-ladders-game
-
(Optional) Set up a virtual environment and install Flask:
python -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows pip install flask
-
Run the app:
python app.py
-
Open your browser and visit:
http://localhost:5000
SNAKE-AND-LADDERS/
βββ static/
β βββ board.jpg
β βββ index.css
β βββ index.js
βββ template/
β βββ index.html
βββ app.py
βββ README.md
- Open the game in your browser.
- Two players take turns rolling the dice.
- The game piece moves according to the dice value.
- If a player lands on a ladder, they climb up.
- If a player lands on a snake, they slide down.
- First to reach the final square wins!
This project is licensed under the MIT License.
- Inspired by the classic board game we all love.
- Python Flask Docs
- MDN Web Docs for JavaScript and CSS references