Swap kind to bytes and reduce chunk size
This commit is contained in:
parent
ceca4eb7fa
commit
aa4df38ead
3 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ package game
|
|||
import "fmt"
|
||||
|
||||
// Kind represents the type of a tile on the map
|
||||
type Kind int
|
||||
type Kind byte
|
||||
|
||||
// Chunk represents a fixed square grid of tiles
|
||||
type Chunk struct {
|
||||
|
|
|
@ -32,7 +32,7 @@ func NewWorld() *World {
|
|||
return &World{
|
||||
Rovers: make(map[uuid.UUID]Rover),
|
||||
CommandQueue: make(map[uuid.UUID]CommandStream),
|
||||
Atlas: NewAtlas(2, 10), // TODO: Choose an appropriate world size
|
||||
Atlas: NewAtlas(2, 8), // TODO: Choose an appropriate world size
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ func jsonPath(name string) string {
|
|||
// Save will serialise the interface into a json file
|
||||
func Save(name string, data interface{}) error {
|
||||
path := jsonPath(name)
|
||||
if b, err := json.MarshalIndent(data, "", "\t"); err != nil {
|
||||
if b, err := json.MarshalIndent(data, "", " "); err != nil {
|
||||
return err
|
||||
} else {
|
||||
if err := ioutil.WriteFile(jsonPath(name), b, os.ModePerm); err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue