是我一个作业,我本身没有不是学计算机的,但有C++的课程。请帮我完成下面这个游戏好吗?
万分感谢!!!
Lucky Dice
Practical Work
By using Microsoft Visual Studio 2008, write a C++ object-oriented program to implement the game
“Lucky Dice”. This game involves two players. At first both players roll dice to see who has the
higher hand; the rank for determining this is governed by the table below. The player having the
lower hand would be given a chance to have a supplementary roll with some dice chosen to be kept,
i.e. no second rolling, based on his/her own preference. If the result is still the lower hand, then
he/she loses the game. Otherwise, the other player can have a chance to roll his/her dice again with
some dice chosen to be kept based on his/her own preference. The game continues until any one get
lower hand in the supplementary roll; then the other player wins the game. The game will restart
whenever a tie occurs.
The combination of the dice points determines the rank of a hand. The descending order of the
combination is listed as follows.
Combination Meaning
Five of a Kind Five dice of one number.
Four of a Kind Four dice of one number; plus an unmatched dice of another
number.
Full House Three dice of one number and two dice of another number.
Straight Five dice of sequential number.
Three of a kind Three dice of the same number; plus two unmatched dice of
other numbers.
Two Pair Two dice of the same number, two dice of another number; plus
one unmatched dice.
One Pair Two dice of the same number; plus three other unmatched dice.
Single All dice of different number. The largest number will be
counted.
1. Your program needs to be designed with a graphical user interface (GUI).
2. While you are responsible for the final design of the program, it is required that the code
governing the rules of the game should be implemented with a separate static library and included
into the managed C++ codes. The managed C++ code you write should only be responsible for
the GUI.
3. Before a user starts to play, he/she needs to login the system first. A file is then created to store
the result of this user when playing the game, e.g. the number of time he/she wins and loses the
game. If this user has played this game before, his/her historical record should be retrieved and
shown on the screen. After he/she plays the game, his/her record should then be modified and
stored.
4. Should you want to get a credit, you should design the game with some advanced features. For
instance, the player is allowed to play with the computer. Some animation on rolling the dice
can be added before the dice points are revealed.
5. Should you want to get a distinction, you are free to add more features to the game that will make
it to be more interesting. You may seek the opinion of your subject lecturer/tutor before you do
so. The criterion is that the added features must be new that require additional but not repeated
effort.