Added type alias for std::pair<uint8_t,uint8_t> for grid coordinates as sf::Vector2 cannot be used in std::map or std::set

This commit is contained in:
Teo-CD 2019-06-08 16:11:29 +02:00
parent 1a79679c21
commit f7481f2bc9
5 changed files with 24 additions and 12 deletions

View file

@ -33,7 +33,7 @@ void Level::render(sf::RenderWindow& renderWindow) const
void Level::runStep()
{
std::vector<std::pair<uint8_t,uint8_t>> newOccupiedSquares{};
std::vector<pro_maat::GridPos> newOccupiedSquares{};
newOccupiedSquares.reserve(occupiedSquares.size());
for(Entity& entity: entities)
@ -72,7 +72,7 @@ void Level::runStep()
std::sort(occupiedSquares.begin(),occupiedSquares.end());
}
Orientation Level::findPath(sf::Vector2i start, sf::Vector2i end, int sign)
Orientation Level::findPath(pro_maat::GridPos start, pro_maat::GridPos end, int sign)
{
// TODO : A* which returns the next move
return Orientation::East;