diff options
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; -}; - |
