aboutsummaryrefslogtreecommitdiff
path: root/src/games/Game.hpp
blob: 1307e79135b194d3d44d0ecb5c4cf9ded4fc6310 (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
28
29
30
31
#pragma once

#include <common/defs.hpp>

#include <SDL3/SDL.h>

#include <memory>
#include <vector>


struct SDL_Window;


class Game {
public:
    enum GameType {
        no_game,
        tetris,
        snake,
        minesweeper,
        breakout
    };

    static std::unique_ptr<Game> Select(GameType type);


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