Added representation of occupied squares and a way to retrieve them for A* implementation
Updated UML
This commit is contained in:
parent
d53f8b32e9
commit
1a79679c21
6 changed files with 95 additions and 5 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <pugixml.hpp>
|
||||
#include <cinttypes>
|
||||
|
||||
#include "Utils.h"
|
||||
|
||||
|
@ -29,7 +30,7 @@ enum class State
|
|||
|
||||
enum class Orientation
|
||||
{
|
||||
Nort = 0,
|
||||
North = 0,
|
||||
East = 90,
|
||||
South = 180,
|
||||
West = 270,
|
||||
|
@ -47,6 +48,11 @@ public:
|
|||
void update();
|
||||
|
||||
const sf::RectangleShape& getShape() const;
|
||||
const State getState() const;
|
||||
const sf::Vector2i getPosition() const;
|
||||
// Don't like it : iterates over every square every tick
|
||||
const std::vector<std::pair<uint8_t, uint8_t>> getOccupiedSquares() const;
|
||||
|
||||
|
||||
/// Position of the target of the current action on the map
|
||||
sf::Vector2i target;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue