Advertisement
n0837

prog8client.cpp

Dec 9th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. //PROG8CLIENT.CPP
  2. #include "prog8tower.h"
  3. #include <iostream>
  4. using namespace std;
  5. int main()
  6. {
  7.     int diskQuantity;
  8.     Tower* gameSession;
  9.  
  10.     do {
  11.         cout << "With how many disks would you like to play? (>=1 / <= 9): ";
  12.         cin >> diskQuantity;
  13.     } while (diskQuantity < 1 || diskQuantity > 9);
  14.  
  15.     gameSession = new Tower(diskQuantity);
  16.     gameSession->showTower();
  17.     gameSession->moveTower(diskQuantity, 1, 3, 2);
  18.  
  19.     delete gameSession;
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement