#include #include enum class Direction { up, down, left, right }; struct SnakeNode { SnakeNode(sf::Vector2i gridPos_in, sf::Color color_in = sf::Color::White); sf::Vector2f windowPos{}; sf::Vector2i gridPos{}; sf::Vector2i previousGridPos{}; Color color{}; }; 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}; };