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

9 years ago
#pragma once
#include <SFML/Graphics.hpp>
#include <stack>
#include "Map.h"
class Explorer {
public:
// Constructors
9 years ago
Explorer(Map* map_);
~Explorer();
// Getters
9 years ago
sf::Vector2i getPosition();
sf::Color getColor();
// Move to the specified destination
void setDestination(sf::Vector2i destination_);
// Follow the pathlist for one move
bool move();
9 years ago
private:
// Color that will be drawn
9 years ago
sf::Color color;
9 years ago
sf::Vector2i position;
// Reference to the map data
9 years ago
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
9 years ago
bool plan(sf::Vector2i destination_);
};