# Arup Guha
# 1/27/2020
# while loop example - Arup's Game of Dice

''' Rules of the Game

    We roll a single fair 6-sided die over and over
    again until we get a 5. The sum of all the rolls
    before we get that first five is our score.

'''
import random

def main():

    curDie = 0
    curScore = 0

    # Keep on going until we roll a five.
    while curDie != 5:

        # Add in the current die roll.
        curScore = curScore + curDie

        # Simulate a die roll.
        curDie = random.randint(1,6)
        print("You rolled", curDie)

    print("You earned a total of",curScore,"dollars!")

    
# Call our main function.
main()
