ndleah / python-mini-project

🙌 Welcome open-source Python mini-project contributions!
MIT License
3.07k stars 1.21k forks source link

Enhance the Dice Rolling project #281

Open Gabriela20103967 opened 3 months ago

Gabriela20103967 commented 3 months ago

Description

This pull request I want to enhance the dice stimulator refactoring the code into a class and add docstrings to it, so the code will be easy to understand, additionally, I incorporate a new feature which this new feature the players can roll the dice again without restarting the terminal, the players can now also exit the game at any time. And I update the README file with these changes.

image

Key Changes:

  1. Refactored code into a class:
    • The functionality of the dice stimulator has been encapsulated within the 'DiceSimulator' class.
    • This restructuring improves code readability, maintainability, and reusability.
      1. Added Docstrings:
    • Comprehensive docstrings have been added to the class and its methods to provide clear documentation on their purpose and usage.
      1. New feature- Play Again Option:
    • Players can now choose to roll the dice again without restarting the program.
    • An option to exit the game has been added, enhancing the user experience.
      1. Update README:
    • The README file has been updated to reflect these changes.
    • Added instructions on how to run the game, game instructions, and details about the new features and class structure.

A short summary of what is included in your Pull Request.

Fixes #279

Type of change

Choosing one or more options from the following as per the nature of your Pull request.

Project

Checklist:

Please tick all the boxes that are fulfilled by your Pull Request.