/dice-roll-with-python

Dice Roll with Python app has a minimal yet user-friendly text-based user interface (TUI) that allows us to specify the number of six-sided dice we'd like to roll. We'll use this TUI to roll the dice at home without having to fly to Las Vegas.

Primary LanguagePython

Dice Roll with Python

Overview

Dice Roll with Python app has a minimal yet user-friendly text-based user interface (TUI) that allows us to specify the number of six-sided dice we'd like to roll. We'll use this TUI to roll the dice at home without having to fly to Las Vegas.

How to run

python dice.py

Result

How many dice do you want to roll? [1-6] 1
~ RESULTS ~
┌─────────┐
│  ●   ●  │
│  ●   ●  │
│  ●   ●  │
└─────────┘
How many dice do you want to roll? [1-6] 3 
~~~~~~~~~~~~~ RESULTS ~~~~~~~~~~~~~
┌─────────┐ ┌─────────┐ ┌─────────┐
│  ●   ●  │ │  ●      │ │  ●   ●  │
│    ●    │ │    ●    │ │    ●    │
│  ●   ●  │ │      ●  │ │  ●   ●  │
└─────────┘ └─────────┘ └─────────┘
How many dice do you want to roll? [1-6] 10
Please enter a number between 1 and 6.

Reference

Build a Dice-Rolling Application With Python