text: #ifndef SNAKE_H
  #define SNAKE_H
  
  #include <SFML/Graphics.hpp>
  #include <SFML/Audio.hpp>
  
  #include <vector>
  
  #include "SnakeNode.h"
  #include "Fruit.h"
  
  namespace sfSnake
  {
  class Snake
  {
  public:
  	Snake();
  
  	void handleInput(sf::RenderWindow& window);
  	void update(sf::Time delta);
  	void render(sf::RenderWindow& window);
  
  	void checkFruitCollisions(std::vector<Fruit>& fruits);
  
  	bool hitSelf() const;
  
  	int new_body = 0;
  
  	unsigned getSize() const;
  
  private:
  	void move();
  	void grow();
  	void checkEdgeCollisions();
  	void checkSelfCollisions();
  	bool isIntersect(const sf::Vector2f& head, const sf::Vector2f& body);
  	void initNodes();
  
  	bool hitSelf_;
  
  	sf::Vector2f position_;
  	sf::Vector2f direction_;
  
  	sf::SoundBuffer pickupBuffer_;
  	sf::Sound pickupSound_;
  
  	sf::SoundBuffer dieBuffer_;
  	sf::Sound dieSound_;
  
  	std::vector<SnakeNode> nodes_;
  
  	static const int InitialSize;
  };
  }
  
  #endif