|
General Details
|
|
C++
|
|
Posted 4.16 Years Ago
|
|
657 Views
|
|
Received 2 Ratings
|
|
Generic Game: Tic-Tac-Toe and High Card
Description
This is part of a larger project I'm making. It'll be a pet interaction program with games for the "pets" and their owners. These classes provide this support. Game is an abstract data type, and the other two classes subclass Game and specialize it. I also threw in a Card class for completeness. I suppose that it serves as a good semi-advanced example of OOP in C++.
I never thought that I could make a game of tic-tac-toe in a way that it contained an "abstract pure virtual method". Eck!
Technical
Compiles with gcc, although it should work with MSVC as well.
Source Code
Comments
| Please login to post comments. |
|
|
Yeah man, I can definitely see your great effort there
|
|
|
@alexxe: Hmm. Make sure that you have everything in the same folder. There should be a total of 8 files in that folder.
@Uranium-239: I will be adding a GUI for the implementation later. These classes purposely disregard implementation, to allow for more control. For example, when testing these classes, I used a simple console based implementation. When I incorporate it into the larger project, I will provide a GUI based implementation.
|
|
|
still have 1 error .. >> cant find game.hpp
it's look like haven define properly ?
|
|
|
Nice, try and use some GUI library though to up the visuals especially if you are making games.
|
|
|
What do you mean? This code is complete, there's just not game implementation, because I'll be writing the implementation inside the pet interface class.
And Thanks :)
|
|
|
Wahoo thats cool! Really need more games here :-) great worrk!
Plan on updating it over time? Or is that like one of those one of challenge kind of codes ;-)
Kind regards,
Scott
|
More "C++" Source Codes By This Author
Recently Posted "C++" Source Codes
Recently Rated "C++" Source Codes
|