Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Help with beginner assignment using monodevelop

Newbie Spellweaver
Joined
Nov 12, 2008
Messages
16
Reaction score
1
Hi everyone,


I hope someone can help me with my little small problem as im new to coding, My university made this assignment and they told us to find the bug for this small game.


i've really done my best trying to solve it. i need to find the bug and the logic and continue it the rest of the code, I can use any loop statement ( switch , for etc.. )

please find the attachment file. there is 3 files Debug 1 , Debug 2 and zilch. i have finished debug 1 and 2 and im stuck at zilch. The description in details are inside the code in a comment , we use monodevelop.

If anyone can help me with zilch file i would appreciate it.

Thanks
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Oct 27, 2008
Messages
165
Reaction score
89
I dont like to give the Answer, but I'll give you hints.

PHP:
//TODO: Read the choice from the player here
//...
//TODO : Implement the other cases based on the menu above. Handle wrong choices as well



PHP:
/* DESCRIPTION:
 This is a one player version of the dice game Zilch, where the player must score a number points in a few turns as possible.

The palyer rolls 3 dice simultaneously.
Points are awarded on the following results:

- A single 1 is worth 100 points.
- Two 1s are worth 200 points.
- A single 5 is worth 50 points.
- Two 5s are worth 100 points.
- Three 1s are works 1000 points.
- Three 2s are works 200 points.
- Three 3s are works 300 points.
- Three 4s are works 400 points.
- Three 5s are works 500 points.
- Three 6s are works 600 points.
 */
/* TODO : Implement the scoring system for the game as explained in the descrition above.
* The variables dice1, dice2 and dice3 hold the value each of the die landed on.
* Based on the result calculate the players current score.
*/
Check if all dices are the same, then update the score according to the dice result, also check if the dices are 1 or 5 and their count, then update the score according to the scoring

PHP:
/* TODO : Edit the code above to allow the player to play infinite turns. 
* Display the menu for every turn the player plays.
* The player will exit the game only if he chooses the Exit option or he reaches a MAGIC SCORE.
* The MAGIC SCORE value is decided by you.
*/
 
Back
Top