#ifndef BOTINTERFACE_HPP #define BOTINTERFACE_HPP #include "common.hpp" #include #include class AISnake { public: std::stack path; AISnake(); void GetNewPath(const sf::Vector2f& source); PlayerDirection GetInput(const sf::Vector2f* source); void UpdateProbability(int snakeSize); void AdjustProbability(double amount); void AddIteration(const int size); void ResetPath(void); int amountPlayed = 0; private: int totalLength = 0; double average = 0; double probabilityBFS = 0.800; bool pathFailed = false; std::stack botPathUnsanitized; void BFS(const sf::Vector2f& source); void DFS(const sf::Vector2f& source); sf::Vector2f GetAnyOpenPath(const sf::Vector2f& source); void UnvisitBoard(void); void UpdateAverage(const int size); void TrimPath(void); void EmptyPath(void); }; #endif