MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / NewMapper

Function NewMapper

internal/mapper/mapper.go:215–228  ·  view source on GitHub ↗
(rootRoomId int)

Source from the content-addressed store, hash-verified

213}
214
215func NewMapper(rootRoomId int) *mapper {
216 rootZone := ""
217 if room := rooms.LoadRoom(rootRoomId); room != nil {
218 rootZone = room.Zone
219 }
220 return &mapper{
221 rootRoomId: rootRoomId,
222 rootZone: rootZone,
223 crawledRooms: make(map[int]*mapNode, 100), // pre-allocate 100
224 roomGrid: RoomGrid{
225 rooms: [][][]*mapNode{},
226 },
227 }
228}
229
230type crawlRoom struct {
231 RoomId int

Callers 6

buildTestMapperFunction · 0.85
buildCycleMapperFunction · 0.85
GetMapperFunction · 0.85
MigrateCoordinatesFunction · 0.85

Calls 1

LoadRoomFunction · 0.92

Tested by 4

buildTestMapperFunction · 0.68
buildCycleMapperFunction · 0.68