#pragma once #include #include enum class Direction { up, down, left, right }; struct SnakeNode { SnakeNode(sf::Vector2u gridPos_in, const Color& color_in); sf::Vector2u gridPos{}; sf::Vector2u previousGridPos{}; Color color{}; [[nodiscard]] sf::Vector2f windowPos(sf::Vector2f gameBoundsOrigin, float size) const; }; struct Player { Player() = default; SnakeNode& head(); std::vector body; int score{}; Direction facing{Direction::up}; Direction inputBuffer{}; bool left{false}; bool right{false}; bool up{false}; bool down{false}; };