Advertisement
vikhik

gridworld main.cpp

Jul 8th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. /*
  2.  * main.cpp
  3.  *
  4.  *  Created on: 08/07/2012
  5.  *      Author: Vikram
  6.  */
  7. #include "gridworld.h"
  8.  
  9. int main() {
  10.  
  11.     gridworld::Map map = gridworld::Map();
  12.     gridworld::Display display = gridworld::Display();
  13.     gridworld::InputManager input = gridworld::InputManager();
  14.  
  15.     bool quit = false;
  16.  
  17.     display.intro();
  18.  
  19.     do {
  20.  
  21.         display.exits(map);
  22.  
  23.         quit = input.runTurn(map);
  24.  
  25.     } while ((map.finish() == false) and (quit == false));
  26.  
  27.     display.finish(map);
  28.  
  29.     if (quit) display.quit();
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement