Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <cctype>
- #include <string>
- #include <sstream>
- #include <fstream>
- #include <array>
- #include "Map.h"
- #include "GameObject.h"
- #include "Beast.h"
- #include "EmptySpace.h"
- #include "ImmovableWall.h"
- #include "MovableWall.h"
- #include "Player.h"
- using namespace std;
- int main()
- {
- Map gameMap = Map(1);
- gameMap.printMap();
- /*char check = 'a';
- int selection;
- do
- {
- cout << "(1) Start the game" << endl;
- cout << "(2) Load a (different) game" << endl;
- cout << "(3) Generate a random game" << endl;
- cout << "(4) Add a beast" << endl;
- cout << "(5) Move the player" << endl;
- cout << "(6) Change player speed" << endl;
- cout << "(7) Save game" << endl;
- cout << "(8) Quit" << endl;
- cin >> selection;
- if(cin.fail() || (selection != 1 && selection != 2 && selection !=3 && selection != 4 && selection != 5 && selection != 6 && selection != 7 && selection !=8))
- {
- cin.clear();
- cin.ignore(100, '\n');
- cout << "There was an error in your input. Please try again." << endl;
- cout << endl;
- }
- else
- {
- switch(selection)
- {
- case 1: //Start the game
- {
- for(int i = 0; i < 23; i++)
- {
- for(int j = 0; j < 40; i++)
- {
- cout << gameMap.grid[i][j].getType();
- }
- }
- }
- break;
- case 2: //Load different game
- break;
- case 3: //Generate a random game
- break;
- case 4: //Add a beast
- int x, y;
- cout << "Enter the x-coordinate: " << endl;
- cin >> x;
- if(cin.fail() || x < 0)
- {
- cin.clear();
- cin.ignore(100, '\n');
- cout << "There was an error in your x input. Please try again." << endl;
- cout << endl;
- }
- cout << "Enter the y-coordinate: " << endl;
- cin >> y;
- if(cin.fail() || y < 0)
- {
- cin.clear();
- cin.ignore(100, '\n');
- cout << "There was an error in your y input. Please try again." << endl;
- cout << endl;
- }
- break;
- case 5: //Move the player
- break;
- case 6: //Change player speed
- break;
- case 7: //Save
- break;
- case 8: //Quit
- check = 'q';
- break;
- }
- }
- }while(check != 'q');
- return 0;*/
- system("Pause");
- };
Add Comment
Please, Sign In to add comment