Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <utility>
- #include "tiles.h"
- #include "Graph/AStar.hpp"
- typedef std::pair<unsigned int, unsigned int> PositionType;
- typedef unsigned int CostType;
- class MapGraphAdapter : public Graph::GraphAdapter<Tiles, PositionType, CostType> {
- public:
- MapGraphAdapter(Tiles& graph) : GraphAdapter(graph) {
- }
- bool isAvailable(const PositionType& position) const {
- bool isOnMap;
- bool isAvailable = false;
- // check if positions is 'on' our map
- isOnMap = (position.first < _graph.shape()[0] && position.second < _graph.shape()[1]);
- // ?
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement