From be346d52f3c13776dfc19736d1b217937d08f991 Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Sun, 16 Aug 2020 19:17:15 -0400 Subject: [PATCH] Hardcode map size --- server/plugin/gamemap/gamemap.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/plugin/gamemap/gamemap.go b/server/plugin/gamemap/gamemap.go index d76ca71..f714204 100644 --- a/server/plugin/gamemap/gamemap.go +++ b/server/plugin/gamemap/gamemap.go @@ -6,7 +6,7 @@ import ( ) type WorldMap struct { - data [][]int + data [64][64]int max_x int max_y int } @@ -39,6 +39,7 @@ func IntializeMap() *WorldMap { worldMap := new(WorldMap) worldMap.max_x = 64 worldMap.max_y = 64 + worldMap.data = [64][64]int{} for x := 0; x < worldMap.max_x; x++ { for y := 0; y < worldMap.max_y; y++ { worldMap.data[x][y] = 0