• 0

C# Dice Game - Help!


Question

2 answers to this question

Recommended Posts

  • 0
Okay so this is what I want to create, I've been asked to do it as an exercise at uni to help improve our understanding of C#. The problem is the last program I created in C# was around 5 months ago and due to having other lectures and seminars i've completely forgot the basics of C#.

This is the briefing

Each player in turn rolls three dice and continues to throw them until a double is thrown. Each throw

that doesn't contain a double counts as a stroke. The throw that contains a double counts as the hole.

The number of strokes and the throw that contained the double are counted and noted down for each

player. 18 rounds are played representing the 18 holes of a golf course and the player with the lowest

total of throws at the end of the game, wins.

By no means am I asking anyone to actually do this for me as that kind of defeats the object of me learning C#. All I need are some pointers and a basic outline of where I need to start and what I need to do to get this working, sorry if this seems easy to some people but i'm not very good at the whole programming thing...!

Hope you can help :)

Ok... fair enough... but I think it is important first for you to tell us what you think, how you will approach the problem.

The most important thing in learning is not how or what, but to understanding the mechanics behind them. If do then learning becomes a breeze.

Link to comment
Share on other sites

  • 0

Think about it in terms of data: you have rounds, players, strokes, holes... what data types should you use to represent these?

Think about it in terms of operations: what happens during a round? what happens at the beginning and end of the game?

If you need a quick review of C#, I suggest you check out this page : http://www.meshplex.org/wiki/C_Sharp/Statements

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.