Skip to content

A concise Python script for a 2-player Ludo game. Features interactive setup, dice rolling, turn switching, and winner checks. Ideal for learning game development or adding a fun project to your portfolio.

License

Notifications You must be signed in to change notification settings

elikem1z/Ludo-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Ludo Game Simulator

ludo

Overview

This project is a Python-based simulation of the classic board game Ludo, designed for two players. It includes all the essential features of the traditional game, such as player movement based on dice rolls, switching turns, and a check for winning conditions. The project aims to provide an interactive and enjoyable experience, simulating the game dynamics with user inputs for player names and choices throughout the game.

Motivation

The motivation behind creating this Ludo game simulator was to bring the cherished board game experience into the digital realm, allowing players to enjoy the game without the need for physical components. This project also serves as an educational tool for beginners in Python programming, demonstrating basic programming concepts like classes, loops, and conditionals in a fun and engaging way.

Code Style

This project adheres to the Python PEP 8 style guide to ensure the readability and maintainability of the code.

Screenshots

image

image

Tech/Framework Used

Built with

  • Python 3.9

Features

  • Interactive Gameplay: Players can enter their names and interact with the game through console inputs.
  • Dice Simulation: Includes a simulated dice roll with outcomes affecting player piece movement.
  • Player Turns: Players take turns based on dice roll outcomes, with special rules for rolling a six.
  • Win Condition Checking: The game checks for win conditions, announcing the winner and concluding the game.

Code Example

player1 = Player(input('Player1, enter your username: '), 'red')
player2 = Player(input('Player2, enter your username: '), 'blue')
ludo2()  # Start the game

Installation

To run this Ludo game simulator, follow these steps:

  1. Ensure Python 3.x is installed on your system.
  2. Download the project files to your local machine.
  3. Open a terminal or command prompt in the project directory.
  4. Run the script with the command: python ludo_game.py

How to Use?

To play the game, start the script as mentioned above. The game will prompt you to enter player names and guide you through the game rules. Follow the on-screen instructions to roll the dice, select pieces to move, and navigate your pieces towards victory.

Contribute

Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcomed.

Credits

Inspiration for this Ludo game simulator came from playing the traditional board game with family and friends and a desire to replicate that experience digitally.

License

MIT © Elikem Hamenoo

About

A concise Python script for a 2-player Ludo game. Features interactive setup, dice rolling, turn switching, and winner checks. Ideal for learning game development or adding a fun project to your portfolio.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages