R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
GameRules.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** Created by hugo on 06/01/2026
4** File description:
5** GameRules.hpp - Game configuration and rules
6*/
7
8#pragma once
9
10#include <cstdint>
11
12namespace server {
13
21 class GameRules {
22 public:
23 GameRules() = default;
24 ~GameRules() = default;
25
26 // Player Configuration
27 constexpr uint32_t getDefaultPlayerHealth() const { return 100; }
28 constexpr uint32_t getDefaultPlayerSpeed() const { return 150; }
29 constexpr uint32_t getPlayerSpawnX() const { return 50; }
30 constexpr uint32_t getPlayerSpawnY() const { return 300; }
31 constexpr float getDefaultPlayerFireRate() const { return 3.0f; }
32 constexpr uint32_t getDefaultPlayerDamage() const { return 25; }
33 };
34
35} // namespace server
Centralized game rules and configuration.
Definition GameRules.hpp:21
constexpr uint32_t getPlayerSpawnY() const
Definition GameRules.hpp:30
constexpr uint32_t getPlayerSpawnX() const
Definition GameRules.hpp:29
GameRules()=default
constexpr uint32_t getDefaultPlayerSpeed() const
Definition GameRules.hpp:28
~GameRules()=default
constexpr uint32_t getDefaultPlayerDamage() const
Definition GameRules.hpp:32
constexpr uint32_t getDefaultPlayerHealth() const
Definition GameRules.hpp:27
constexpr float getDefaultPlayerFireRate() const
Definition GameRules.hpp:31