Fix up TODOs and comments that have now been done
This commit is contained in:
parent
a784b06c2a
commit
6a868d3e41
4 changed files with 4 additions and 6 deletions
|
@ -7,7 +7,6 @@ const (
|
||||||
TileEmpty = Tile(0)
|
TileEmpty = Tile(0)
|
||||||
TileRover = Tile(1)
|
TileRover = Tile(1)
|
||||||
|
|
||||||
// TODO: Is there even a difference between these two?
|
|
||||||
TileWall = Tile(2)
|
TileWall = Tile(2)
|
||||||
TileRock = Tile(3)
|
TileRock = Tile(3)
|
||||||
)
|
)
|
||||||
|
|
|
@ -37,7 +37,7 @@ func NewWorld(size int, chunkSize int) *World {
|
||||||
return &World{
|
return &World{
|
||||||
Rovers: make(map[uuid.UUID]Rover),
|
Rovers: make(map[uuid.UUID]Rover),
|
||||||
CommandQueue: make(map[uuid.UUID]CommandStream),
|
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)
|
return i.Attributes, fmt.Errorf("couldn't get tile for new position: %s", err)
|
||||||
} else if tile == TileEmpty {
|
} else if tile == TileEmpty {
|
||||||
// Set the world tiles
|
// Set the world tiles
|
||||||
// TODO: Make this (and other things) transactional
|
|
||||||
if err := w.Atlas.SetTile(newPos, TileRover); err != nil {
|
if err := w.Atlas.SetTile(newPos, TileRover); err != nil {
|
||||||
return i.Attributes, fmt.Errorf("coudln't set rover tile: %s", err)
|
return i.Attributes, fmt.Errorf("coudln't set rover tile: %s", err)
|
||||||
} else if err := w.Atlas.SetTile(i.Attributes.Pos, TileEmpty); err != nil {
|
} else if err := w.Atlas.SetTile(i.Attributes.Pos, TileEmpty); err != nil {
|
||||||
|
|
|
@ -21,8 +21,6 @@ type StatusResponse struct {
|
||||||
Version string `json:"version"`
|
Version string `json:"version"`
|
||||||
Tick int `json:"tick"`
|
Tick int `json:"tick"`
|
||||||
NextTick string `json:"nexttick,omitempty"`
|
NextTick string `json:"nexttick,omitempty"`
|
||||||
|
|
||||||
// TODO: return more useful info
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==============================
|
// ==============================
|
||||||
|
|
|
@ -98,7 +98,9 @@ func NewServer(opts ...ServerOption) *Server {
|
||||||
|
|
||||||
// Create the accountant
|
// Create the accountant
|
||||||
s.accountant = accounts.NewAccountant()
|
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
|
return s
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue