I'm trying to put together a tic tac toe game for a c++ class. Requirements are that it have two classes - gameboard and gamepiece. The gameboard I've pretty much taken care of, but I'm confused on how to set up the gamepiece class.
Here's the requirements as given to us:
Game Board must have at least the following:
Constructor specified game board size, with default parameter set to 3
Overloaded assignment operator for Game Boards
Operator overloads to insert and remove game pieces
Member functions to play either side of the game
Member functions to check for a winner
Member functions to reset the game
Overloaded ostream operator to print the board and piece.
Overloaded ofstream operator to save the board and piece.
Overloaded ifstream operator input the board and pieces from a file
Game pieces must have at least
Identifier to tell if X or O
A fixed size char string to hold the player’s name
Operator overloads required above
Overloaded == and != operator
I'm especially confused about overloading == and !=. Also confused on how to use one identifier for x or o.
Any ideas??? Help???
Thanks...