From 6a868d3e41780be94ad34ac084ee8ade4b31bcfb Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Tue, 9 Jun 2020 18:33:30 +0100 Subject: [PATCH] Fix up TODOs and comments that have now been done --- pkg/game/tile.go | 1 - pkg/game/world.go | 3 +-- pkg/rove/api.go | 2 -- pkg/server/server.go | 4 +++- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/game/tile.go b/pkg/game/tile.go index f7d7039..954f571 100644 --- a/pkg/game/tile.go +++ b/pkg/game/tile.go @@ -7,7 +7,6 @@ const ( TileEmpty = Tile(0) TileRover = Tile(1) - // TODO: Is there even a difference between these two? TileWall = Tile(2) TileRock = Tile(3) ) diff --git a/pkg/game/world.go b/pkg/game/world.go index 8a7a2a1..150a9b1 100644 --- a/pkg/game/world.go +++ b/pkg/game/world.go @@ -37,7 +37,7 @@ func NewWorld(size int, chunkSize int) *World { return &World{ Rovers: make(map[uuid.UUID]Rover), CommandQueue: make(map[uuid.UUID]CommandStream), - Atlas: NewAtlas(size, chunkSize), // TODO: Choose an appropriate world size + Atlas: NewAtlas(size, chunkSize), } } @@ -198,7 +198,6 @@ func (w *World) MoveRover(id uuid.UUID, bearing bearing.Bearing) (RoverAttribute return i.Attributes, fmt.Errorf("couldn't get tile for new position: %s", err) } else if tile == TileEmpty { // Set the world tiles - // TODO: Make this (and other things) transactional if err := w.Atlas.SetTile(newPos, TileRover); err != nil { return i.Attributes, fmt.Errorf("coudln't set rover tile: %s", err) } else if err := w.Atlas.SetTile(i.Attributes.Pos, TileEmpty); err != nil { diff --git a/pkg/rove/api.go b/pkg/rove/api.go index 45c6d50..308e816 100644 --- a/pkg/rove/api.go +++ b/pkg/rove/api.go @@ -21,8 +21,6 @@ type StatusResponse struct { Version string `json:"version"` Tick int `json:"tick"` NextTick string `json:"nexttick,omitempty"` - - // TODO: return more useful info } // ============================== diff --git a/pkg/server/server.go b/pkg/server/server.go index ae4dd3b..7bd2852 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -98,7 +98,9 @@ func NewServer(opts ...ServerOption) *Server { // Create the accountant s.accountant = accounts.NewAccountant() - s.world = game.NewWorld(4, 8) // TODO: Configure this + + // Start small, we can grow the world later + s.world = game.NewWorld(4, 8) return s }