45 lines
992 B
C++
45 lines
992 B
C++
#include "std_lib_inc.h"
|
|
#include "Maze.h"
|
|
#include "PositionVector.h"
|
|
#include "MazeParser.h"
|
|
#include "Game.h"
|
|
#include "Exceptions/ExitGame.h"
|
|
#include "Exceptions/MalformedMaze.h"
|
|
#include "Exceptions/MovementNotPossible.h"
|
|
#include "Exceptions/UnkownAction.h"
|
|
|
|
using game::Player;
|
|
using game::PositionVector;
|
|
using game::Maze;
|
|
using game::MazeParser;
|
|
using game::Game;
|
|
|
|
using game_exceptions::MalformedMaze;
|
|
using game_exceptions::UnkownAction;
|
|
using game_exceptions::MovementNotPossible;
|
|
using game_exceptions::ExitGame;
|
|
|
|
// Ein Programm, welches dir erlaubt ein Labyrinth zu erkunden mit 'w', 'a', 's', und 'd'.
|
|
|
|
int main()
|
|
{
|
|
try
|
|
{
|
|
Maze maze = MazeParser::request_maze_from_user();
|
|
|
|
Game game = Game(maze);
|
|
|
|
game.run_game();
|
|
}
|
|
catch (MalformedMaze& _)
|
|
{
|
|
cout << "Fehler beim Einlesen des Labyrinths.\n";
|
|
} catch (ExitGame& _)
|
|
{
|
|
cout << "Schoenen Tag noch!" << "\n";
|
|
}
|
|
|
|
|
|
// Beende das Programm
|
|
return 0;
|
|
}
|