You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
676 B
38 lines
676 B
#pragma once
|
|
#include <SFML/Graphics.hpp>
|
|
#include <stack>
|
|
#include "Map.h"
|
|
|
|
class Explorer {
|
|
public:
|
|
// Constructors
|
|
Explorer(Map* map_);
|
|
~Explorer();
|
|
|
|
// Getters
|
|
sf::Vector2i getPosition();
|
|
sf::Color getColor();
|
|
|
|
// Move to the specified destination
|
|
void setDestination(sf::Vector2i destination_);
|
|
|
|
// Follow the pathlist for one move
|
|
bool move();
|
|
|
|
private:
|
|
// Color that will be drawn
|
|
sf::Color color;
|
|
|
|
sf::Vector2i position;
|
|
|
|
// Reference to the map data
|
|
Map* map;
|
|
|
|
// Moves list that will be filled with plan(), and executed by move()
|
|
std::deque<int> movement_stack;
|
|
|
|
// Fills the movement stack with moves
|
|
bool plan(sf::Vector2i destination_);
|
|
};
|
|
|