MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / getBuildableTilesForPlayerInArea

Method getBuildableTilesForPlayerInArea

source/gamemap/GameMap.cpp:2490–2506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2488}
2489
2490std::vector<Tile*> GameMap::getBuildableTilesForPlayerInArea(int x1, int y1, int x2, int y2,
2491 Player* player)
2492{
2493 std::vector<Tile*> tiles = rectangularRegion(x1, y1, x2, y2);
2494 for (std::vector<Tile*>::iterator it = tiles.begin(); it != tiles.end();)
2495 {
2496 Tile* tile = *it;
2497 if (!tile->isBuildableUpon(player->getSeat()))
2498 {
2499 it = tiles.erase(it);
2500 continue;
2501 }
2502
2503 ++it;
2504 }
2505 return tiles;
2506}
2507
2508std::string GameMap::getGoalsStringForPlayer(Player* player)
2509{

Callers 4

checkBuildTrapDefaultMethod · 0.80
checkBuildRoomDefaultMethod · 0.80
checkBuildRoomMethod · 0.80
buildRoomMethod · 0.80

Calls 2

isBuildableUponMethod · 0.80
getSeatMethod · 0.45

Tested by

no test coverage detected