epr24pr3_ojanssen2/main.cpp

44 lines
964 B
C++
Raw Permalink Normal View History

2024-12-02 17:47:09 +01:00
#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"
2024-12-02 17:47:09 +01:00
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;
2024-12-02 17:47:09 +01:00
// Ein Programm, welches dir erlaubt ein Labyrinth zu erkunden mit 'w', 'a', 's', und 'd'.
2024-12-02 17:47:09 +01:00
int main()
2024-12-02 17:47:09 +01:00
{
try
{
Maze maze = MazeParser::request_maze_from_user();
Game game = Game(maze);
game.run_game();
2024-12-16 23:21:24 +01:00
}
catch (MalformedMaze& _)
{
cout << "Fehler beim Einlesen des Labyrinths.\n";
} catch (ExitGame& _)
{
cout << "Schoenen Tag noch!" << "\n";
}
2024-12-02 17:47:09 +01:00
return 0;
}