Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

TicTacToe - board.h

By: vsg1990 on Sep 17th, 2012  |  syntax: C++  |  size: 0.47 KB  |  views: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <string>
  2. #include <iostream>
  3.  
  4. using std::string;
  5.  
  6. class Board
  7. {
  8. public:
  9.         Board();
  10.         int SetSquare(int nPosition, string XorO);
  11.         void PrintBoard();
  12.         void ResetBoard();
  13.         bool CheckWinCondition();
  14.         string GetWinningPlayer();
  15. private:
  16.         string sPosTopLeft;
  17.         string sPosTopMid;
  18.         string sPosTopRight;
  19.         string sPosMidLeft;
  20.         string sPosMidMid;
  21.         string sPosMidRight;
  22.         string sPosBotLeft;
  23.         string sPosBotMid;
  24.         string sPosBotRight;
  25.         string sWinningPlayer;
  26.  
  27. };