Skip to content

added new roller dice game#3201

Merged
geekcomputers merged 1 commit into
geekcomputers:masterfrom
vivek2004-sec:dice_roller
Jul 6, 2026
Merged

added new roller dice game#3201
geekcomputers merged 1 commit into
geekcomputers:masterfrom
vivek2004-sec:dice_roller

Conversation

@vivek2004-sec

@vivek2004-sec vivek2004-sec commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a dice-rolling simulator feature. The user is prompted for how many dice to roll, and each die's outcome is displayed as ASCII/box-drawing art (rather than plain numbers) using a dice_art dictionary that maps each face (1–6) to a 5-line tuple of box-drawing characters (┌, ─, │, └) and dot symbols (●) for pips.
Dice are currently displayed in a horizontal layout — all dice printed side-by-side, line by line, so the output resembles a real dice throw laid out on a table. A vertical layout option (each die's art printed fully before the next) is included but currently commented out, so it can be toggled on if needed later.
Finally, the program calculates and prints the total sum of all dice rolled.
Problem it solves: Plain text dice output like [3, 5, 1] is unintuitive and unengaging. This makes rolls visually clear and more fun to read — useful for CLI board game utilities, tabletop RPG tools, or as a teaching example of dictionaries, string formatting, and nested loops.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code cleanup/refactoring

Related Issues

Closes #3201

Testing

Please describe the tests you've run to verify your changes:

  • Manual testing
  • Added automated tests
  • Existing tests pass

Checklist

  • My code follows the project's code style
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the README.md if needed
  • My changes generate no new warnings
  • [ x I have tested my code locally
  • New and existing tests pass with my changes

Screenshots (if applicable)

Add screenshots or demos of your changes if relevant.

@vivek2004-sec

Copy link
Copy Markdown
Contributor Author

Hi! Just wanted to flag that the failing Python Checks / Test (3.11) check appears to be caused by pre-existing lint issues across the repository (445 ruff errors total, spanning many unrelated files), not by the file I added in this PR (dice_roller.py).
I ran ruff check locally against dice_roller.py in isolation and it passes cleanly with no errors. The CI seems to lint the entire codebase rather than just the changed files, so any PR will currently fail this check regardless of the diff.
Happy to make any changes needed on my end — just let me know if there's something specific to dice_roller.py I should fix. Thanks!

@vivek2004-sec vivek2004-sec reopened this Jul 6, 2026
@geekcomputers geekcomputers merged commit 7c47e78 into geekcomputers:master Jul 6, 2026
3 of 9 checks passed
@vivek2004-sec vivek2004-sec deleted the dice_roller branch July 6, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants