Fix up TODOs and comments that have now been done

This commit is contained in:
Marc Di Luzio 2020-06-09 18:33:30 +01:00
parent a784b06c2a
commit 6a868d3e41
4 changed files with 4 additions and 6 deletions

View file

@ -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)
)

View file

@ -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 {

View file

@ -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
}
// ==============================

View file

@ -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
}