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

Function newMapRender

internal/mapper/mapper.map.go:15–27  ·  view source on GitHub ↗
(mapWidth int, mapHeight int)

Source from the content-addressed store, hash-verified

13}
14
15func newMapRender(mapWidth int, mapHeight int) mapRender {
16 ret := mapRender{
17 Render: make([][]MapCell, mapHeight),
18 legend: make(map[rune]string, 3),
19 }
20 for y := 0; y < mapHeight; y++ {
21 ret.Render[y] = make([]MapCell, mapWidth)
22 for x := 0; x < mapWidth; x++ {
23 ret.Render[y][x] = MapCell{Symbol: ' '}
24 }
25 }
26 return ret
27}
28
29func (m *mapRender) GetLegend(overrides map[rune]string) map[rune]string {
30 ret := map[rune]string{}

Callers 2

GetLimitedMapMethod · 0.85
GetFullMapMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected