save me from getting "F"

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2006
Posts: 7
Reputation: neno14me is an unknown quantity at this point 
Solved Threads: 0
neno14me neno14me is offline Offline
Newbie Poster

save me from getting "F"

 
0
  #1
Apr 18th, 2006
i have got this OOP project of implementing minesweeper using classes.Can anybody just hint me what classes i have to use and what would be their relationship like association,containment,weak containment and strong like that.anybody plz.If i failed to do so i would be getting an f!!!!!plz!!!!!!!!!!!!!!
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,052
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: save me from getting "F"

 
2
  #2
Apr 18th, 2006
If you're thinking about "relationships" like association, containment, and such, then you're not thinking about solving the problem. Think about what your program would be doing when running minesweeper, and then the classes that you find convenient to use will fall out directly from the types of objects you're thinking of.
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 7
Reputation: neno14me is an unknown quantity at this point 
Solved Threads: 0
neno14me neno14me is offline Offline
Newbie Poster

Re: save me from getting "F"

 
0
  #3
Apr 19th, 2006
ya i know that but i don`t know how many classes should be made like should i make classes of mines,board,timer and what relationship these classes are holding???likewise
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 8
Reputation: eCharisma is an unknown quantity at this point 
Solved Threads: 1
eCharisma eCharisma is offline Offline
Newbie Poster

Re: save me from getting "F"

 
0
  #4
Apr 19th, 2006
ya i know that
Then all you need to do is apply it. Rather than think of how many classes you need or the relationships between classes this early, think of a solution and map the unique collections of data and behavior to classes. If you get bogged down in OOP theory, you'll never get anything done.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 501
Reputation: Bench has a spectacular aura about Bench has a spectacular aura about Bench has a spectacular aura about 
Solved Threads: 50
Bench's Avatar
Bench Bench is offline Offline
Posting Pro

Re: save me from getting "F"

 
0
  #5
Apr 19th, 2006
The answer is "that depends" - you have to think about how you want to go about making the program - there's no right or wrong answer, because it depends largely on how simple or complicated your program will be. Entities such as Mine or Board are fairly important to a minesweeper game, however, a timer might be an optional addon which you leave til the basic mechanics are working. (obviously you'd leave provision for one to be added).

If you take a look at Windows minesweeper, it's quite a complicated program, with a changing face, different coloured numbers, score board, etc.. but it probably started out as just a board of clickable squares.

It would also be worth noting that OOP is just a tool, so no need to spend ages pouring over class diagrams & relationships - if you find that your program doesn't benefit from OOP, don't use it.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 7
Reputation: neno14me is an unknown quantity at this point 
Solved Threads: 0
neno14me neno14me is offline Offline
Newbie Poster

Re: save me from getting "F"

 
0
  #6
Apr 19th, 2006
as now i have come to know and i have made the relationships about classes now i am having a big problem of drawing the board of minesweeper .i have to draw it without using mfc and how about the timer thing.the timer should go on.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: save me from getting "F"

 
0
  #7
Apr 20th, 2006
>i have to draw it without using mfc

Then you should be glad

http://img476.imageshack.us/img476/5171/cut20ln.png
Piworld
[Tis simple as Pie]
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 7
Reputation: neno14me is an unknown quantity at this point 
Solved Threads: 0
neno14me neno14me is offline Offline
Newbie Poster

Re: save me from getting "F"

 
0
  #8
Apr 21st, 2006
ya.its good but i am worried out the timer thing that is continously updating.can anybody pelase tell me what to do about the timer thing.i have to make function that takes input and updates timer continously at the same place.the timer is updated irrespective of the input given or not
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: save me from getting "F"

 
0
  #9
Apr 22nd, 2006
Originally Posted by neno14me
ya.its good but i am worried out the timer thing that is continously updating.can anybody pelase tell me what to do about the timer thing.i have to make function that takes input and updates timer continously at the same place.the timer is updated irrespective of the input given or not
Well, how are you handling the GUI components of the game?

Options.
1. Use a rather hackish console display with <windows.h> commands
2. Use win32 -yuck
3. Use mfc - yucky
4. Use C# - yay.

:lol:

In any case the GUI should be the last thing you should consider. First you have to get all your methods for your class ready. For instance,

... mines,board,timer,player's move,set bombs,check if bomb,uncover squares, number uncovered squares...and so on

http://img476.imageshack.us/img476/5171/cut20ln.png
Piworld
[Tis simple as Pie]
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 7
Reputation: neno14me is an unknown quantity at this point 
Solved Threads: 0
neno14me neno14me is offline Offline
Newbie Poster

Re: save me from getting "F"

 
0
  #10
Apr 23rd, 2006
hey guyz!!! thank ya all for ur comments .i `ve made all the classes and its working good now what i need is some informationa bout the timer class.is there any headre file fron where i can display a stopwatch in digits.........please tell me cauz im in dire need for this.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC