| 474 | } |
| 475 | |
| 476 | void Seat::setMapSize(int x, int y) |
| 477 | { |
| 478 | if(mPlayer == nullptr) |
| 479 | return; |
| 480 | if(!mPlayer->getIsHuman()) |
| 481 | return; |
| 482 | |
| 483 | mTilesStates = std::vector<std::vector<TileStateNotified>>(x, std::vector<TileStateNotified>(y)); |
| 484 | // By default, we know that rock (ground & full) will be set as rock full tiles, |
| 485 | // gold (ground & full) will be set as gold full tiles, |
| 486 | // other tiles will be set as dirt full tiles |
| 487 | for(int xxx = 0; xxx < x; ++xxx) |
| 488 | { |
| 489 | for(int yyy = 0; yyy < y; ++yyy) |
| 490 | { |
| 491 | Tile* tile = mGameMap->getTile(xxx, yyy); |
| 492 | if(tile == nullptr) |
| 493 | continue; |
| 494 | |
| 495 | if(tile->getType() == TileType::gold) |
| 496 | { |
| 497 | mTilesStates[xxx][yyy].mTileVisual = TileVisual::goldFull; |
| 498 | continue; |
| 499 | } |
| 500 | |
| 501 | if(tile->getType() == TileType::rock) |
| 502 | { |
| 503 | mTilesStates[xxx][yyy].mTileVisual = TileVisual::rockFull; |
| 504 | continue; |
| 505 | } |
| 506 | |
| 507 | mTilesStates[xxx][yyy].mTileVisual = TileVisual::dirtFull; |
| 508 | } |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | unsigned int Seat::checkAllGoals() |
| 513 | { |
no test coverage detected