Hardcode map size

This commit is contained in:
Layla 2020-08-16 19:17:15 -04:00
parent fb43cb1fb7
commit be346d52f3
No known key found for this signature in database
GPG Key ID: A494D9357BA1BE31

View File

@ -6,7 +6,7 @@ import (
) )
type WorldMap struct { type WorldMap struct {
data [][]int data [64][64]int
max_x int max_x int
max_y int max_y int
} }
@ -39,6 +39,7 @@ func IntializeMap() *WorldMap {
worldMap := new(WorldMap) worldMap := new(WorldMap)
worldMap.max_x = 64 worldMap.max_x = 64
worldMap.max_y = 64 worldMap.max_y = 64
worldMap.data = [64][64]int{}
for x := 0; x < worldMap.max_x; x++ { for x := 0; x < worldMap.max_x; x++ {
for y := 0; y < worldMap.max_y; y++ { for y := 0; y < worldMap.max_y; y++ {
worldMap.data[x][y] = 0 worldMap.data[x][y] = 0