25 lines
821 B
C++
Executable File
25 lines
821 B
C++
Executable File
#ifndef BOTINTERFACE_HPP
|
|
#define BOTINTERFACE_HPP
|
|
|
|
#include "common.hpp"
|
|
#include <stack>
|
|
#include <vector>
|
|
#include <SFML/System/Vector2.hpp>
|
|
|
|
namespace snakeplusplus
|
|
{
|
|
class AISnake {
|
|
public:
|
|
std::stack<sf::Vector2f> path;
|
|
AISnake();
|
|
void GetNewPath(const std::vector< std::vector<char> >& gameBoard, const sf::Vector2f& source, const sf::Vector2f& boundaries, const int snakeSize);
|
|
PlayerDirection GetInput(const sf::Vector2f* source);
|
|
private:
|
|
std::stack<sf::Vector2f> botPathUnsanitized;
|
|
void BFS(const std::vector< std::vector<char> >& gameBoard, const sf::Vector2f& source, const sf::Vector2f& boundaries);
|
|
void DFS(const std::vector< std::vector<char> >& gameBoard, const sf::Vector2f& source, const sf::Vector2f& boundaries);
|
|
};
|
|
}
|
|
|
|
#endif
|