chore: fixed outdated comments
This commit is contained in:
parent
070de3f46a
commit
45c45058b8
6 changed files with 5 additions and 26 deletions
|
@ -1,7 +1,3 @@
|
||||||
//
|
|
||||||
// Created by moonleay on 12/17/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef EXITGAME_H
|
#ifndef EXITGAME_H
|
||||||
#define EXITGAME_H
|
#define EXITGAME_H
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
//
|
|
||||||
// Created by moonleay on 12/17/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef MALFORMEDMAZE_H
|
#ifndef MALFORMEDMAZE_H
|
||||||
#define MALFORMEDMAZE_H
|
#define MALFORMEDMAZE_H
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
//
|
|
||||||
// Created by moonleay on 12/17/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef MOVEMENTNOTPOSSIBLE_H
|
#ifndef MOVEMENTNOTPOSSIBLE_H
|
||||||
#define MOVEMENTNOTPOSSIBLE_H
|
#define MOVEMENTNOTPOSSIBLE_H
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
//
|
|
||||||
// Created by moonleay on 12/17/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef UNKOWNACTION_H
|
#ifndef UNKOWNACTION_H
|
||||||
#define UNKOWNACTION_H
|
#define UNKOWNACTION_H
|
||||||
|
|
||||||
|
|
9
Game.cpp
9
Game.cpp
|
@ -82,16 +82,11 @@ namespace game
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
movement_vector = handle_user_input(game_input);
|
movement_vector = handle_user_input(game_input);
|
||||||
|
player.move(this->maze, movement_vector);
|
||||||
} catch (UnkownAction& err)
|
} catch (UnkownAction& err)
|
||||||
{
|
{
|
||||||
cout << err.what() << "\n";
|
cout << err.what() << "\n";
|
||||||
}
|
} catch (MovementNotPossible& err)
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
player.move(this->maze, movement_vector);
|
|
||||||
}
|
|
||||||
catch (MovementNotPossible& err)
|
|
||||||
{
|
{
|
||||||
cout << err.what() << "\n";
|
cout << err.what() << "\n";
|
||||||
}
|
}
|
||||||
|
|
6
Maze.h
6
Maze.h
|
@ -29,7 +29,7 @@ namespace game
|
||||||
bool was_player_killed_by_ghost(const Player& player) const;
|
bool was_player_killed_by_ghost(const Player& player) const;
|
||||||
|
|
||||||
/// Kontrolliere, ob der Spieler am Ziel ist
|
/// Kontrolliere, ob der Spieler am Ziel ist
|
||||||
/// @param pos Die Position des Spielers
|
/// @param player Der Spieler
|
||||||
/// @return Ob der Spieler am Ziel ist
|
/// @return Ob der Spieler am Ziel ist
|
||||||
bool is_player_at_goal(const Player& player) const;
|
bool is_player_at_goal(const Player& player) const;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ namespace game
|
||||||
bool is_pos_free(const PositionVector& pos, const bool& player_has_key) const;
|
bool is_pos_free(const PositionVector& pos, const bool& player_has_key) const;
|
||||||
|
|
||||||
/// Zeige das Spielfeld in der Konsole an
|
/// Zeige das Spielfeld in der Konsole an
|
||||||
/// @param pos Die Position des Spielers
|
/// @param player Der Spieler
|
||||||
void render(const Player& player) const;
|
void render(const Player& player) const;
|
||||||
|
|
||||||
/// Kriege den Wert einer Position
|
/// Kriege den Wert einer Position
|
||||||
|
@ -49,7 +49,7 @@ namespace game
|
||||||
char get_field(const PositionVector& pos) const;
|
char get_field(const PositionVector& pos) const;
|
||||||
|
|
||||||
/// Ersetze den Wert von einer Position
|
/// Ersetze den Wert von einer Position
|
||||||
/// @param target_pos Die Position die ersetzt werden soll
|
/// @param pos Die Position die ersetzt werden soll
|
||||||
/// @param target Der Wert, auf den die Position gesetzt werden soll
|
/// @param target Der Wert, auf den die Position gesetzt werden soll
|
||||||
void update_field(const PositionVector& pos, const char& target);
|
void update_field(const PositionVector& pos, const char& target);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue