mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-27 21:23:30 -08:00
Fix movement within quadrant
This commit is contained in:
@@ -174,6 +174,7 @@ namespace SuperStarTrek.Objects
|
||||
{
|
||||
_quadrant = new Quadrant(_quadrant.Galaxy[quadrant], this, _random, _quadrant.Galaxy, _input, _output);
|
||||
}
|
||||
_quadrant.SetEnterpriseSector(sector);
|
||||
SectorCoordinates = sector;
|
||||
|
||||
return GetTimeElapsed(quadrant, warpFactor);
|
||||
|
||||
@@ -176,5 +176,11 @@ namespace SuperStarTrek.Space
|
||||
.Select(y => new Coordinates(x, y))
|
||||
.Select(c => _sectors.GetValueOrDefault(c))
|
||||
.Select(o => o?.ToString() ?? " "));
|
||||
|
||||
internal void SetEnterpriseSector(Coordinates sector)
|
||||
{
|
||||
_sectors.Remove(_enterprise.SectorCoordinates);
|
||||
_sectors[sector] = _enterprise;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user