| | |
save me from getting "F"
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2006
Posts: 7
Reputation:
Solved Threads: 0
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!!!!!!!!!!!!!!
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.
•
•
Join Date: Apr 2006
Posts: 8
Reputation:
Solved Threads: 1
•
•
•
•
ya i know that
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.
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.
>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]
Then you should be glad

http://img476.imageshack.us/img476/5171/cut20ln.png
Piworld ™
[Tis simple as Pie]
•
•
•
•
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
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]
![]() |
Other Threads in the C++ Forum
- Previous Thread: ERROR: Segmentation Fault
- Next Thread: Visual c++ toolkit 2003
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






