raise SystemExit(1)
# pylint: disable=raise-missing-from
try:
- line = replayfp.readline().strip()
- (leader, __, seed) = line.split()
- # pylint: disable=eval-used
- seed = eval(seed)
- line = replayfp.readline().strip()
- arguments += line.split()[2:]
+ while True:
+ line = replayfp.readline().strip()
+ print(line)
+ if line == "#":
+ break
+ if line.startswith("# seed"):
+ (__, __, seed) = line.split()
+ # pylint: disable=eval-used
+ seed = eval(seed)
+ elif line.startswith("# arguments"):
+ arguments += line.split()[2:]
except ValueError: # pragma: no cover
sys.stderr.write("sst: replay file %s is ill-formed\n"% val)
raise SystemExit(1)
+# seed 1556084761
+# arguments
+# SST2K version 2.4
+# Test bringing game up, viewing galaxy, quitting
+# recorded by esr@snark.thyrsus.com on Wed Apr 24 01:46:01 2019
+#
-SUPER- STAR TREK
-Would you like a regular, tournament, or saved game? # SST2K version 2.4
-# Test bringing game up, viewing galaxy, quitting
-# recorded by esr@snark.thyrsus.com on Wed Apr 24 01:46:01 2019
-#
-r
+Would you like a regular, tournament, or saved game? r
Would you like a Short, Medium, or Long game? s
Are you a Novice, Fair, Good, Expert, or Emeritus player? g
Choose your game style (plain, almy, fancy or just press enter): f
+# seed 1556101787
+# arguments regular short good fancy
+# SST2K version 2.4
+# Test critical hit on sensors
+# recorded by esr@snark.thyrsus.com on Wed Apr 24 06:29:47 2019
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.4
-# Test critical hit on sensors
-# recorded by esr@snark.thyrsus.com on Wed Apr 24 06:29:47 2019
-#
-chart
+COMMAND> chart
STAR CHART FOR THE KNOWN GALAXY
1 2 3 4 5 6 7 8
a | ... ... ... ... ... ... ... ... |
+# seed 1556102474
+# arguments regular short good fancy
+# SST2K version 2.4
+# Test Tholian boxing us in followed by death by tractor beam
+# recorded by esr@snark.thyrsus.com on Wed Apr 24 09:48:31 2019
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.4
-# Test Tholian boxing us in followed by death by tractor beam
-# recorded by esr@snark.thyrsus.com on Wed Apr 24 09:48:31 2019
-#
-chart
+COMMAND> chart
STAR CHART FOR THE KNOWN GALAXY
1 2 3 4 5 6 7 8
a | ..8 ..4 ... ... ... ... ... ... |
+# seed 1556116333
+# arguments regular short good fancy
+# SST2K version 2.4
+# Test starbase destruction, planet destruction, docking after destruction.
+# recorded by esr@snark.thyrsus.com on Fri Aug 11 08:59:1 3 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.4
-# Test starbase destruction, planet destruction, docking after destruction.
-# recorded by esr@snark.thyrsus.com on Fri Aug 11 08:59:1 3 2023
-#
-chart
+COMMAND> chart
STAR CHART FOR THE KNOWN GALAXY
1 2 3 4 5 6 7 8
a | .1. .1. ... .1. 107 ..3 ..2 ... |
+# seed 1556120044
+# arguments regular short good fancy
+# Test deep-space probes
+# recorded by esr@snark.thyrsus.com on Wed Apr 24 11:34:04 2019
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # Test deep-space probes
-# recorded by esr@snark.thyrsus.com on Wed Apr 24 11:34:04 2019
-#
-chart
+COMMAND> chart
STAR CHART FOR THE KNOWN GALAXY
1 2 3 4 5 6 7 8
a | ... ... ... ... ..8 ..5 106 ... |
+# seed 1556121767
+# arguments regular short good fancy
+# SST2K version 2.4
+# Test shuttle landing with no crystals
+# recorded by esr@snark.thyrsus.com on Wed Apr 24 12:02:47 2019
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.4
-# Test shuttle landing with no crystals
-# recorded by esr@snark.thyrsus.com on Wed Apr 24 12:02:47 2019
-#
-chart
+COMMAND> chart
STAR CHART FOR THE KNOWN GALAXY
1 2 3 4 5 6 7 8
a | ... ... ... ... ... ... ... ... |
+# seed 1691789031
+# arguments regular medium good fancy
+# SST2K version 2.7
+# Test supercommander destruction.
+# recorded by esr@snark.thyrsus.com on Fri Aug 11 17:23:51 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test supercommander destruction.
-# recorded by esr@snark.thyrsus.com on Fri Aug 11 17:23:51 2023
-#
-sh up
+COMMAND> sh up
Shields already up.
COMMAND> phasers
+# seed 1691831923
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test game-win condition
+# recorded by esr@snark.thyrsus.com on Sat Aug 12 05:18:43 2023
+#
-SUPER- STAR TREK
The Enterprise is currently in Quadrant a8 Sector f4
Good Luck!
-COMMAND> # SST2K version 2.7
-# Test game-win condition
-# recorded by esr@snark.thyrsus.com on Sat Aug 12 05:18:43 2023
-#
-chart
+COMMAND> chart
STAR CHART FOR THE KNOWN GALAXY
1 2 3 4 5 6 7 8
a | ... ... ... ... ... ... ..3 <..3> |
+# seed 1691779887
+# arguments regular medium good fancy
+# SST2K version 2.7
+# Test behavior of Tholian
+# recorded by esr@snark.thyrsus.com on Fri Aug 11 14:51:27 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test behavior of Tholian
-# recorded by esr@snark.thyrsus.com on Fri Aug 11 14:51:27 2023
-#
-srscan
+COMMAND> srscan
Short-range scan
1 2 3 4 5 6 7 8 9 10
a T . . . . . E . . .
+# seed 1691834337
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test game timeout condition
+# recorded by esr@snark.thyrsus.com on Sat Aug 12 05:58:57 2023
+#
-SUPER- STAR TREK
The Enterprise is currently in Quadrant a8 Sector c1
Good Luck!
-COMMAND> # SST2K version 2.7
-# Test game timeout condition
-# recorded by esr@snark.thyrsus.com on Sat Aug 12 05:58:57 2023
-#
-rest
+COMMAND> rest
How long? 16
Are you sure? y
+# seed 1556212919
+# arguments regular short good fancy
+# SST2K version 2.5
+# Test loss by energy exhaustion.
+# recorded by esr@snark.thyrsus.com on Thu Apr 25 13:21:59 2019
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.5
-# Test loss by energy exhaustion.
-# recorded by esr@snark.thyrsus.com on Thu Apr 25 13:21:59 2019
-#
-m a 1 4
+COMMAND> m a 1 4
COMMAND> sh up
Shields raised.
+# seed 1691778615
+# arguments regular medium good fancy
+# SST2K version 2.7
+# Test dilithium mining
+# recorded by esr@snark.thyrsus.com on Fri Aug 11 14:30:15 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test dilithium mining
-# recorded by esr@snark.thyrsus.com on Fri Aug 11 14:30:15 2023
-#
-status
+COMMAND> status
Stardate 3135.8, Time Left 14.00
Condition GREEN, 0 DAMAGES
Position c7 , c9
+# seed 1556292107
+# arguments regular short good fancy
+# SST2K version 2.5
+# Test multiple critical hits ending in defeat by Supercommander
+# recorded by esr@snark.thyrsus.com on Fri Apr 26 11:21:47 2019
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.5
-# Test multiple critical hits ending in defeat by Supercommander
-# recorded by esr@snark.thyrsus.com on Fri Apr 26 11:21:47 2019
-#
-torp 3 7 4 8 4 9 2
+COMMAND> torp 3 7 4 8 4 9 2
Track for torpedo number 1- g4
***Klingon at Sector g4 destroyed.
+# seed 1691765367
+# arguments
+# SST2K version 2.7
+# Test death by black hole
+# recorded by esr@snark.thyrsus.com on Fri Aug 11 10:49:27 2023
+#
-SUPER- STAR TREK
-Would you like a regular, tournament, or saved game? # SST2K version 2.7
-# Test death by black hole
-# recorded by esr@snark.thyrsus.com on Fri Aug 11 10:49:27 2023
-#
-r
+Would you like a regular, tournament, or saved game? r
Would you like a Short, Medium, or Long game? s
Are you a Novice, Fair, Good, Expert, or Emeritus player? n
Choose your game style (plain, almy, fancy or just press enter): fancy
+# seed 1691766356
+# arguments regular medium good fancy
+# SST2K version 2.7
+# Test encounter with Romulan and multiline torpedo firing
+# recorded by esr@snark.thyrsus.com on Fri Aug 11 11:05:56 2023
+#
-SUPER- STAR TREK
INTRUDER! YOU HAVE VIOLATED THE ROMULAN NEUTRAL ZONE.
LEAVE AT ONCE, OR YOU WILL BE DESTROYED!
-COMMAND> # SST2K version 2.7
-# Test encounter with Romulan and multiline torpedo firing
-# recorded by esr@snark.thyrsus.com on Fri Aug 11 11:05:56 2023
-#
-m a 5 9
+COMMAND> m a 5 9
Enemy attack reduces shield strength to 94%, torpedoes left 10
+# seed 1691769251
+# arguments regular medium good fancy
+# SST2K version 2.7
+# Test malformed torpedo command
+# recorded by esr@snark.thyrsus.com on Fri Aug 11 11:54:11 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test malformed torpedo command
-# recorded by esr@snark.thyrsus.com on Fri Aug 11 11:54:11 2023
-#
-torp 1 3
+COMMAND> torp 1 3
Beg your pardon, Captain?
COMMAND> quit
+# seed 1691774489
+# arguments regular medium good fancy
+# SST2K version 2.7
+# Test commander destruction and supernova alert
+# recorded by esr@snark.thyrsus.com on Fri Aug 11 13:31:26 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test commander destruction and supernova alert
-# recorded by esr@snark.thyrsus.com on Fri Aug 11 13:31:26 2023
-#
-m 6 4
+COMMAND> m 6 4
(Manual movement assumed.)
Helmsman Sulu- "Aye, Sir."
+# seed 1691786582
+# arguments regular medium good fancy
+# SST2K version 2.7
+# Test behavior when emy is buffered into black hole
+# recorded by esr@snark.thyrsus.com on Fri Aug 11 16:43:02 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test behavior when emy is buffered into black hole
-# recorded by esr@snark.thyrsus.com on Fri Aug 11 16:43:02 2023
-#
-chart
+COMMAND> chart
STAR CHART FOR THE KNOWN GALAXY
1 2 3 4 5 6 7 8
a | ... ... ... ... ..4 <..7> ..5 ... |
+# seed 1692088612
+# arguments regular medium novice plain
+# SST2K version 2.7
+# Test plain interface and old-fashioned coordinates
+# recorded by esr@snark.thyrsus.com on Tue Aug 15 04:36:52 2023
+#
-SUPER- STAR TREK
-Please type in a secret password- # SST2K version 2.7
-# Test plain interface and old-fashioned coordinates
-# recorded by esr@snark.thyrsus.com on Tue Aug 15 04:36:52 2023
-#
-foo
+Please type in a secret password- foo
It is stardate 4349. The Federation is being attacked by
+# seed 1692093194
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test self-destruct
+# recorded by esr@snark.thyrsus.com on Tue Aug 15 05:53:14 2023
+#
-SUPER- STAR TREK
The Enterprise is currently in Quadrant h8 Sector c8
Good Luck!
-COMMAND> # SST2K version 2.7
-# Test self-destruct
-# recorded by esr@snark.thyrsus.com on Tue Aug 15 05:53:14 2023
-#
-destruct
+COMMAND> destruct
---WORKING---
SELF-DESTRUCT-SEQUENCE-ACTIVATED
10
+# seed 1692093957
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test edge and failure cases in coordinate parsing
+# recorded by esr@snark.thyrsus.com on Tue Aug 15 06:05:57 2023
+#
-SUPER- STAR TREK
The Enterprise is currently in Quadrant b6 Sector c3
Good Luck!
-COMMAND> # SST2K version 2.7
-# Test edge and failure cases in coordinate parsing
-# recorded by esr@snark.thyrsus.com on Tue Aug 15 06:05:57 2023
-#
-sr
+COMMAND> sr
Short-range scan
1 2 3 4 5 6 7 8 9 10
a . . . . . . . . . .
+# seed 1692177511
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test torpedoing uninhabited planet
+# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:18:31 2023
+#
-SUPER- STAR TREK
The Enterprise is currently in Quadrant e4 Sector c9
Good Luck!
-COMMAND> # SST2K version 2.7
-# Test torpedoing uninhabited planet
-# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:18:31 2023
-#
-m a i9
+COMMAND> m a i9
COMMAND> torpedo 1 i5
+# seed 1692177676
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test torpedoing inhabited planet and starbase
+# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:21:16 2023
+#
-SUPER- STAR TREK
The Enterprise is currently in Quadrant b2 Sector e9
Good Luck!
-COMMAND> # SST2K version 2.7
-# Test torpedoing inhabited planet and starbase
-# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:21:16 2023
-#
-m a c0
+COMMAND> m a c0
Beg your pardon, Captain?
COMMAND> m a c9
+# seed 1692177875
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test cloaking device with no enemies present
+# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:24:35 2023
+#
-SUPER- STAR TREK
The Enterprise is currently in Quadrant h6 Sector a6
Good Luck!
-COMMAND> # SST2K version 2.7
-# Test cloaking device with no enemies present
-# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:24:35 2023
-#
-cloak
+COMMAND> cloak
Switch cloaking device on? y
Spock- "Captain, using the cloaking device is a violation
of the Treaty of Algeron. Considering the alternatives,
+# seed 1692263971
+# arguments regular medium expert fancy
+# SST2K version 2.7
+# Test death ray (successful)
+# recorded by esr@snark.thyrsus.com on Thu Aug 17 05:19:31 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test death ray (successful)
-# recorded by esr@snark.thyrsus.com on Thu Aug 17 05:19:31 2023
-#
-deathray
+COMMAND> deathray
Spock- "Captain, the 'Experimental Death Ray'
is highly unpredictible. Considering the alternatives,
+# seed 1692178191
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test damage-report command (no damage)
+# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:29:51 2023
+#
-SUPER- STAR TREK
The Enterprise is currently in Quadrant c1 Sector g6
Good Luck!
-COMMAND> # SST2K version 2.7
-# Test damage-report command (no damage)
-# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:29:51 2023
-#
-damage
+COMMAND> damage
All devices functional.
COMMAND> quit
+# seed 1692178540
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test simple collision and damage treport.
+# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:35:40 2023
+#
-SUPER- STAR TREK
INTRUDER! YOU HAVE VIOLATED THE ROMULAN NEUTRAL ZONE.
LEAVE AT ONCE, OR YOU WILL BE DESTROYED!
-COMMAND> # SST2K version 2.7
-# Test simple collision and damage treport.
-# recorded by esr@snark.thyrsus.com on Wed Aug 16 05:35:40 2023
-#
-m a j7
+COMMAND> m a j7
***RED ALERT! RED ALERT!
***COLLISION IMMINENT.
+# seed 1692187822
+# arguments regular medium novice fancy
+# SST2K version 2.7
+# Test encounter with Space Thingy and torperdoing it
+# recorded by esr@snark.thyrsus.com on Wed Aug 16 08:28:50 2023
+#
-SUPER- STAR TREK
The Enterprise is currently in Quadrant d6 Sector h8
Good Luck!
-COMMAND> # SST2K version 2.7
-# Test encounter with Space Thingy and torperdoing it
-# recorded by esr@snark.thyrsus.com on Wed Aug 16 08:28:50 2023
-#
-m a e8
+COMMAND> m a e8
COMMAND> m a a1
+# seed 1692210781
+# arguments regular medium expert fancy
+# SST2K version 2.7
+# Test capture - trdsuccessful
+# recorded by esr@snark.thyrsus.com on Wed Aug 16 14:33:01 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test capture - trdsuccessful
-# recorded by esr@snark.thyrsus.com on Wed Aug 16 14:33:01 2023
-#
-phasers
+COMMAND> phasers
Weapons Officer Sulu- "High-speed shield control enabled, sir."
Manual or automatic? a
+# seed 1692212577
+# arguments regular medium expert fancy
+# SST2K version 2.7
+# Test death ray - failure (kaboom)
+# recorded by esr@snark.thyrsus.com on Wed Aug 16 15:02:57 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test death ray - failure (kaboom)
-# recorded by esr@snark.thyrsus.com on Wed Aug 16 15:02:57 2023
-#
-chart
+COMMAND> chart
STAR CHART FOR THE KNOWN GALAXY
1 2 3 4 5 6 7 8
a | .1. ... ... ... ... ... ... ... |
+# seed 1692263709
+# arguments regular medium expert fancy
+# SST2K version 2.7
+# Test death ray - fail (mutation)
+# recorded by esr@snark.thyrsus.com on Thu Aug 17 05:15:09 2023
+#
-SUPER- STAR TREK
Good Luck!
YOU'LL NEED IT.
-COMMAND> # SST2K version 2.7
-# Test death ray - fail (mutation)
-# recorded by esr@snark.thyrsus.com on Thu Aug 17 05:15:09 2023
-#
-deathray
+COMMAND> deathray
Spock- "Captain, the 'Experimental Death Ray'
is highly unpredictible. Considering the alternatives,