R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
GameEndedEvent.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** Created by hugo on 12/12/2025
4** File description:
5** GameEndedEvent.hpp
6*/
7
8#pragma once
9
11
12namespace server {
13
18 class GameEndedEvent : public GameEvent {
19 public:
24 explicit GameEndedEvent(const std::string &reason = "")
25 : GameEvent(Type::GAME_ENDED), _reason(reason) {}
26
27 ~GameEndedEvent() override = default;
28
32 const std::string &getReason() const { return _reason; }
33
34 private:
35 std::string _reason;
36 };
37
38} // namespace server
Event triggered when the game ends.
GameEndedEvent(const std::string &reason="")
Construct a GameEndedEvent.
~GameEndedEvent() override=default
const std::string & getReason() const
Get the reason for game ending.
Base class for all game-related events.
Definition GameEvent.hpp:19