diff options
| author | fschildt <florian.schildt@protonmail.com> | 2026-01-20 01:22:45 +0100 |
|---|---|---|
| committer | fschildt <florian.schildt@protonmail.com> | 2026-01-20 01:59:19 +0100 |
| commit | 6da9be5810bf82e9d0b3b2a8bce7606ef2e2bf93 (patch) | |
| tree | 28bb67ad879f8bbb36476a537fe8b69195500146 /src/games/pong/Pong.hpp | |
| parent | f463853872210415e06fb3f863325fdba303ab65 (diff) | |
breakout: delete pong, add breakout
Diffstat (limited to 'src/games/pong/Pong.hpp')
| -rw-r--r-- | src/games/pong/Pong.hpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/games/pong/Pong.hpp b/src/games/pong/Pong.hpp deleted file mode 100644 index ec6145b..0000000 --- a/src/games/pong/Pong.hpp +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include "games/Game.hpp" -#include "common/shapes.hpp" - - -class Pong : public Game { - enum PaddleDirection { - NONE = 0, - UP = 1, - DOWN = -1 - }; - - struct Paddle { - float y; - PaddleDirection dir; - }; - - struct Ball { - Circle circle; - V2F32 velocity; - }; - - static constexpr float PADDLE_HEIGHT = 0.5f; - static constexpr float PADDLE_WIDTH = 0.2f; - static constexpr float PADDLE_SPEED = 1.0f; - -private: - void Start() override; - void ProcessEvent(SDL_Event& event) override; - void FinishUpdate(float dt) override; - void Draw() override; - -private: - void MovePaddle(Paddle& paddle, float dt); - void MoveBall(float dt); - -private: - Paddle m_paddles[2]; - Ball m_ball; -}; - |
