Add black-hole collision test.
[super-star-trek.git] / sst.py
diff --git a/sst.py b/sst.py
index b3264ee904fc341e370e8b4a9016f26f4467db88..e2bf5c378288421101bbd0fdce810982e122e7e0 100755 (executable)
--- a/sst.py
+++ b/sst.py
@@ -5437,7 +5437,9 @@ def setup():
     game.instar = 0
     for i in range(GALSIZE):
        for j in range(GALSIZE):
-           k = randrange(1, QUADSIZE**2/10)
+            # Can't have more stars per quadrant than fit in one decimal digit,
+            # if we do the chart representation will break. 
+           k = randrange(1, min(10, QUADSIZE**2/10))
            game.instar += k
            game.state.galaxy[i][j].stars = k
     # Locate star bases in galaxy