aboutsummaryrefslogtreecommitdiff
path: root/src/games/Game.hpp
blob: b09b618e50c23793f0508275e6daaa5264f993f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include <basic/defs.hpp>
#include <SDL3/SDL.h>
#include <memory>
#include <vector>
#include <renderer/RenderGroup.hpp>

struct SDL_Window;

class Game {
public:
    enum GameType {
        NO_GAME,
        TETRIS,
        SNAKE,
        MINESWEEPER
    };

    static std::unique_ptr<Game> Select(GameType type, RenderGroup& render_group);

    Game() = default;
    virtual ~Game();

    virtual bool Update(std::vector<SDL_Event> &events) = 0;
};