Fix error when navigating out of bounds

This commit is contained in:
Andrew Cooper
2021-04-15 23:00:36 +10:00
parent 8169f1e64a
commit 94c0d23983
+2 -2
View File
@@ -81,10 +81,10 @@ namespace SuperStarTrek.Space
var newQuadrant = (int)(galacticCoordinate / 8);
var newSector = (int)(galacticCoordinate - newQuadrant * 8);
if (newSector == -1)
if (newSector < 0)
{
newQuadrant -= 1;
newSector = 7;
newSector += 8;
}
return newQuadrant switch