improve code for game "Dice";