Remove a bit of logging that is now unnecessary.
[super-star-trek.git] / sst.py
diff --git a/sst.py b/sst.py
index 5b7dcdd08b3d9b515b43b764129208585e647f6d..d99ba7aac8acf6e3898de16013c3663284648d1d 100755 (executable)
--- a/sst.py
+++ b/sst.py
@@ -45,11 +45,17 @@ import random
 class randomizer:
     @staticmethod
     def withprob(p):
-        return random.random() < p
+        b = random.random() < p
+        if logfp:
+            logfp.write("#withprob(%.2f) -> %s\n" % (p, b))
+        return b
 
     @staticmethod
     def randrange(*args):
-        return random.randrange(*args)
+        s = random.randrange(*args)
+        if logfp:
+            logfp.write("#randrange%s -> %s\n" % (args, s))
+        return s
 
     @staticmethod
     def real(*args):
@@ -58,10 +64,14 @@ class randomizer:
             v *= args[0]                 # from [0, args[0])
         elif len(args) == 2:
             v = args[0] + v*(args[1]-args[0])        # from [args[0], args[1])
+        if logfp:
+            logfp.write("#real%s -> %f\n" % (args, v))
         return v
 
     @staticmethod
     def seed(n):
+        if logfp:
+            logfp.write("#seed(%d)\n" % n)
         random.seed(n)
 
 GALSIZE        = 8             # Galaxy size in quadrants
@@ -6692,7 +6702,6 @@ if __name__ == '__main__':
                     line = replayfp.readline().strip()
                     (leader, __, seed) = line.split()
                     seed = eval(seed)
-                    sys.stderr.write("sst2k: seed set to %s\n" % seed)
                     line = replayfp.readline().strip()
                     arguments += line.split()[2:]
                     replay = True