| 637 | } |
| 638 | |
| 639 | void Tile::copyFloodFillToOtherSeats(Seat* seatToCopy) |
| 640 | { |
| 641 | if(seatToCopy->getTeamIndex() >= mFloodFillColor.size()) |
| 642 | { |
| 643 | static bool logMsg = false; |
| 644 | if(!logMsg) |
| 645 | { |
| 646 | logMsg = true; |
| 647 | OD_LOG_ERR("Wrong floodfill seat index seatId=" + Helper::toString(seatToCopy->getId()) |
| 648 | + ", tile=" + Tile::displayAsString(this) |
| 649 | + ", seatIndex=" + Helper::toString(seatToCopy->getTeamIndex()) + ", floodfillsize=" + Helper::toString(static_cast<uint32_t>(mFloodFillColor.size()))); |
| 650 | } |
| 651 | return; |
| 652 | } |
| 653 | |
| 654 | std::vector<uint32_t>& valuesToCopy = mFloodFillColor[seatToCopy->getTeamIndex()]; |
| 655 | for(uint32_t indexFloodFill = 0; indexFloodFill < mFloodFillColor.size(); ++indexFloodFill) |
| 656 | { |
| 657 | if(seatToCopy->getTeamIndex() == indexFloodFill) |
| 658 | continue; |
| 659 | |
| 660 | std::vector<uint32_t>& values = mFloodFillColor[indexFloodFill]; |
| 661 | for(uint32_t intType = 0; intType < static_cast<uint32_t>(FloodFillType::nbValues); ++intType) |
| 662 | values[intType] = valuesToCopy[intType]; |
| 663 | |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | void Tile::logFloodFill() const |
| 668 | { |
no test coverage detected