Guest User

main.cpp

a guest
Jun 5th, 2014
5,244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <iostream>
  2. #include "TicTacToeGame.h"
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     char input;
  9.     bool isDone = false;
  10.     //here is our game object
  11.     TicTacToeGame game;
  12.  
  13.     //Outer Game Loop
  14.     while (isDone == false) {
  15.         //this plays a game of tic tac toe!
  16.         game.playGame();
  17.         // We have to see if they want to play again!
  18.         cout << "Would you like to play again? (Y/N): ";
  19.         cin >> input;
  20.         if (input == 'N' || input == 'n') {
  21.             isDone = true;
  22.         }
  23.     }
  24.  
  25.     system("PAUSE");
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment