//
// Created by sebastian on 02.08.26.
//

#ifndef COLORRACE_GAMEMODE_H
#define COLORRACE_GAMEMODE_H
#include <type_traits>
#include <vector>

#include "GameState.h"


namespace engine {
    template <typename Command, typename Event, typename State>
    class GameMode {
    public:
        static_assert(std::is_base_of_v<GameState, State>, "State must be derived from GameState");

        virtual ~GameMode() = default;

        virtual void sendCommand(const Command& command) = 0;
        virtual std::vector<Event> pollEvents() = 0;
        [[nodiscard]] virtual const State& getState() const = 0;
    };
}


#endif //COLORRACE_GAMEMODE_H
