| 382 | } |
| 383 | |
| 384 | bool CanPlaceRandomObject(Point position, Displacement standoff) |
| 385 | { |
| 386 | for (int yy = -standoff.deltaY; yy <= standoff.deltaY; yy++) { |
| 387 | for (int xx = -standoff.deltaX; xx <= standoff.deltaX; xx++) { |
| 388 | Point tile = position + Displacement { xx, yy }; |
| 389 | if (!RndLocOk(tile.x, tile.y)) |
| 390 | return false; |
| 391 | } |
| 392 | } |
| 393 | return true; |
| 394 | } |
| 395 | |
| 396 | std::optional<Point> GetRandomObjectPosition(Displacement standoff) |
| 397 | { |
no test coverage detected