buildTestMapper creates a simple 3-room chain: 1 -east-> 2 -south-> 3
()
| 9 | |
| 10 | // buildTestMapper creates a simple 3-room chain: 1 -east-> 2 -south-> 3 |
| 11 | func buildTestMapper() *mapper { |
| 12 | m := NewMapper(1) |
| 13 | m.crawledRooms = map[int]*mapNode{ |
| 14 | 1: {RoomId: 1, Pos: positionDelta{x: 0, y: 0, z: 0}, Exits: map[string]nodeExit{"east": {RoomId: 2}}}, |
| 15 | 2: {RoomId: 2, Pos: positionDelta{x: 1, y: 0, z: 0}, Exits: map[string]nodeExit{"south": {RoomId: 3}}}, |
| 16 | 3: {RoomId: 3, Pos: positionDelta{x: 1, y: 1, z: 0}, Exits: map[string]nodeExit{}}, |
| 17 | } |
| 18 | return m |
| 19 | } |
| 20 | |
| 21 | // buildCycleMapper creates a graph with a cycle: 1 <-> 2 -> 3 |
| 22 | func buildCycleMapper() *mapper { |
no test coverage detected