| 27 | }; |
| 28 | |
| 29 | Direction flipDirection(Direction direction) { |
| 30 | if (direction == Direction::Left) |
| 31 | return Direction::Right; |
| 32 | if (direction == Direction::Right) |
| 33 | return Direction::Left; |
| 34 | if (direction == Direction::Up) |
| 35 | return Direction::Down; |
| 36 | if (direction == Direction::Down) |
| 37 | return Direction::Up; |
| 38 | if (direction == Direction::Any) |
| 39 | return Direction::Any; |
| 40 | throw DungeonException("Invalid direction"); |
| 41 | } |
| 42 | |
| 43 | MaterialId biomeMaterialForJson(int variant) { |
| 44 | if (variant == 0) |