| 530 | } |
| 531 | |
| 532 | bool KeeperAI::buildRoom(RoomType roomType, int x, int y, int roomSize) |
| 533 | { |
| 534 | std::vector<Tile*> tiles = mGameMap.getBuildableTilesForPlayerInArea(x, y, x + roomSize - 1, |
| 535 | y + roomSize - 1, &mPlayer); |
| 536 | if (tiles.size() < static_cast<uint32_t>(roomSize * roomSize)) |
| 537 | return false; |
| 538 | |
| 539 | if(!RoomManager::buildRoomOnTiles(&mGameMap, roomType, &mPlayer, tiles)) |
| 540 | return false; |
| 541 | |
| 542 | OD_LOG_INF("AI seatId=" + Helper::toString(mPlayer.getSeat()->getId())+ " builds room type=" + Helper::toString(static_cast<uint32_t>(roomType)) + ", x=" + Helper::toString(x) + ", y=" + Helper::toString(y) + ", roomSize=" + Helper::toString(roomSize)); |
| 543 | return true; |
| 544 | } |
| 545 | |
| 546 | bool KeeperAI::checkNeedRoom(RoomType roomType) |
| 547 | { |
nothing calls this directly
no test coverage detected