| 1446 | } |
| 1447 | |
| 1448 | bool IsSlopeRefused(Slope current, Slope refused) |
| 1449 | { |
| 1450 | if (IsSteepSlope(current)) return true; |
| 1451 | if (current != SLOPE_FLAT) { |
| 1452 | if (IsSteepSlope(refused)) return true; |
| 1453 | |
| 1454 | Slope t = ComplementSlope(current); |
| 1455 | |
| 1456 | if ((refused & SLOPE_W) && (t & SLOPE_NW)) return true; |
| 1457 | if ((refused & SLOPE_S) && (t & SLOPE_NE)) return true; |
| 1458 | if ((refused & SLOPE_E) && (t & SLOPE_SW)) return true; |
| 1459 | if ((refused & SLOPE_N) && (t & SLOPE_SE)) return true; |
| 1460 | } |
| 1461 | |
| 1462 | return false; |
| 1463 | } |
| 1464 | |
| 1465 | /** |
| 1466 | * Are the tiles of the industry free? |
no test coverage detected