Fortune Telling Collection - Free divination - -The dice game written in Python is almost finished, but there are some things I don't understand. ...

-The dice game written in Python is almost finished, but there are some things I don't understand. ...

yacht

Recently, I wrote a little game, which is often played in bars, and then guessed the number of dice.

I wrote three versions, a Java, a C++ and a python.

Java is too simple, its basic functions are not perfect, and its rules are incorrect. Forget it.

Compared with the python version, the C++ version is more perfect and playable, and the python version is more powerful, with more functions, and the computer AI is more capable.

Address of C++ version: DiceGame

Python version address: DiceGame

Python version requires python 2.5 to run.

Python 2.5.2 download address: python 2.5.2.

A friend wrote a beautiful mobile phone version, which was completed by Adobe Flash Lite: BeautyDice.rar.

This is the rule of the game.

Liar's dice (big talk dice, ancient puzzle dice)

Two or more people play, and each person has five dice. Everyone shakes it once, and then looks at the points in his box. The dealer starts to shout how many points are in his dice box (usually called 2 3s, 2 6s, 3 2s, etc.). ). Then the other party guesses whether it is true or not. If the other person believes it, start over at home. If it is not true, it will be verified out of the box. If it is true, the dealer wins and the guesser loses; If it is not true, the guesser wins and the dealer loses. Losers drink.

note:

1, the number of calls can only get bigger and bigger (for example, two sixes, three twos, two sixes can't make two threes).

2, 1 point can be used as any number, for example, there are only three 2 points in the dice box, 1 1 point, and the dealer can actually think that he has four 2 points; But if the dealer types 1, then 1 cannot be regarded as any subsequent number (for example, two 1, four 1, etc.).