Guest User

TicTacToeGame.h

a guest
Jun 5th, 2014
4,634
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. #pragma once
  2. class TicTacToeGame
  3. {
  4. public:
  5.     //Constructor
  6.     TicTacToeGame();
  7.  
  8.     //This plays the game
  9.     void playGame();
  10.  
  11. private:
  12.  
  13.     //Gets input from the user
  14.     int getXCoord();
  15.     int getYCoord();
  16.     //Places a marker. If it returns false, it couldnt place!
  17.     bool placeMarker(int x, int y, char currentPlayer);
  18.  
  19.     //Returns true if the current player won!
  20.     bool checkForVictory(char currentPlayer);
  21.  
  22.     //Empties the board
  23.     void clearBoard();
  24.     // Prints the board
  25.     void printBoard();
  26.  
  27.     //This stores the board state
  28.     char board[3][3];
  29. };
Advertisement
Add Comment
Please, Sign In to add comment