Skip to content

Matin-python/Ludo-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Ludo Game Simulation

A console-based implementation of the classic Ludo board game built with Python. The game supports multiple players, dice rolling, piece movement, safe zones, piece elimination, and win detection.

Features

  • Multiplayer gameplay
  • Dice rolling simulation
  • Piece spawning and movement
  • Safe zones
  • Piece elimination (hitting opponent pieces)
  • Win condition detection
  • Input validation
  • Object-Oriented Programming (OOP) design

Technologies Used

  • Python 3

Project Structure

Ludo-Game/
│
├── ludo.py
├── README.md
└── LICENSE

Requirements

  • Python 3.x

No external libraries are required.

How to Run

Run the game from the terminal:

python ludo.py

How to Play

  1. Choose the number of players.
  2. Players take turns rolling the dice.
  3. Roll a 6 to bring a piece onto the board.
  4. Move pieces according to the dice value.
  5. Land on an opponent's piece to send it back to the starting area.
  6. Safe zones protect pieces from being eliminated.
  7. Move all four pieces to the finish area to win the game.

Example Gameplay

Player 1 rolled: 6
Choose a piece to move: 1

Player 1 moved piece 1 by 6 spaces.

Player 2 rolled: 4
Choose a piece to move: 2

Learning Objectives

This project demonstrates:

  • Object-Oriented Programming (Classes and Objects)
  • Game Logic Implementation
  • Turn-Based Systems
  • Input Validation
  • Lists and Loops
  • Random Number Generation
  • State Management

Future Improvements

  • Graphical User Interface (GUI)
  • Colored game board visualization
  • Human vs Computer mode
  • Save and load game state
  • Network multiplayer
  • Improved board representation

License

This project is licensed under the MIT License.

Author

Mohammad Reza Bakhshandeh

Electrical Engineering (Electronics) Graduate

Interested in Python Development, Computer Vision, Machine Learning, and Artificial Intelligence.

About

A console-based Ludo game built in Python featuring multiplayer gameplay, dice simulation, piece movement, safe zones, and win detection.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages