Skip to content

colloceo/snakes

Repository files navigation

🐍 Snakes & Ladders Game

A modern, interactive web-based Snakes & Ladders game built with vanilla HTML, CSS, and JavaScript.

🎮 Features

  • Two Game Modes: Play against a friend or challenge the computer
  • Smooth Animations: Fluid token movement and dice rolling effects
  • Responsive Design: Works perfectly on desktop and mobile devices
  • Real-time Game Log: Track every move and game event
  • Visual Effects: Burst animations for snakes and ladders
  • Move Counter: Keep track of total moves in the game

🚀 Live Demo

Play the game live at: GitHub Pages Link

🎯 How to Play

  1. Choose your game mode:

    • 1 Player: Play against the computer (you are Blue, computer is Red)
    • 2 Players: Play with a friend locally
  2. Click the dice to roll (1-6)

  3. Your token moves automatically based on the dice roll

  4. Ladders: Land at the bottom to climb to the top

  5. Snakes: Land on the head to slide down to the tail

  6. Win: First player to reach square 100 wins!

🛠️ Technologies Used

  • HTML5: Semantic structure and game board
  • CSS3: Modern styling with gradients and animations
  • JavaScript ES6+: Game logic and interactive features
  • Responsive Design: Mobile-first approach

📁 Project Structure

snakes-ladders/ ├── index.html # Main game file ├── snakes.jpg # Game board image ├── favicon1.jpeg # Favicon └── README.md # Project documentation 

🎨 Game Features

Visual Elements

  • Beautiful gradient backgrounds
  • Smooth token animations
  • Dice rolling effects with rotation
  • Winner celebration with burst effects
  • Color-coded player turns

Game Mechanics

  • Accurate snake and ladder positions
  • Turn-based gameplay
  • Computer AI opponent
  • Game state management
  • Move validation

🔧 Setup & Installation

  1. Clone the repository:
git clone https://github.com/colloceo/snakes.git cd snakes
  1. Open index.html in your web browser or serve it using a local server:
# Using Python python -m http.server 8000 # Using Node.js npx serve .
  1. Navigate to http://localhost:8000 to play the game

📱 Mobile Support

The game is fully responsive and optimized for mobile devices with:

  • Touch-friendly controls
  • Adaptive layout for small screens
  • Optimized token and dice sizes

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is open source and available under the MIT License.

👨💻 Developer

Collins Otieno

🎉 Acknowledgments

  • Classic Snakes & Ladders board game
  • Modern web development practices
  • Responsive design principles

Enjoy playing Snakes & Ladders! 🎲🐍🪜

About

snakes

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors