projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ubuntu has abolished /usr/bin/python, change shebang to python3.
[super-star-trek.git]
/
sst.py
diff --git
a/sst.py
b/sst.py
index b2067e965cfa4863bf58e7a9f9a03cf647363a6b..c90472c36e82650716cbc82c52d86ef0da8adcba 100755
(executable)
--- a/
sst.py
+++ b/
sst.py
@@
-1,4
+1,4
@@
-#!/usr/bin/env python
+#!/usr/bin/env python
3
"""
sst.py -- Super Star Trek 2K
"""
sst.py -- Super Star Trek 2K
@@
-17,6
+17,7
@@
from __future__ import print_function, division
import os, sys, math, curses, time, pickle, copy, gettext, getpass
import getopt, socket, locale
import os, sys, math, curses, time, pickle, copy, gettext, getpass
import getopt, socket, locale
+import codecs
# This import only works on Unixes. The intention is to enable
# Ctrl-P, Ctrl-N, and friends in Cmd.
# This import only works on Unixes. The intention is to enable
# Ctrl-P, Ctrl-N, and friends in Cmd.
@@
-31,7
+32,7
@@
try:
except NameError:
my_input = input
except NameError:
my_input = input
-version = "2.
5
"
+version = "2.
6
"
docpath = (".", "doc/", "/usr/share/doc/sst/")
docpath = (".", "doc/", "/usr/share/doc/sst/")
@@
-2858,7
+2859,7
@@
def supernova(w):
for nq.i in range(GALSIZE):
for nq.j in range(GALSIZE):
nstars += game.state.galaxy[nq.i][nq.j].stars
for nq.i in range(GALSIZE):
for nq.j in range(GALSIZE):
nstars += game.state.galaxy[nq.i][nq.j].stars
- if stars == 0:
+ if
n
stars == 0:
return # nothing to supernova exists
num = rnd.integer(nstars) + 1
for nq.i in range(GALSIZE):
return # nothing to supernova exists
num = rnd.integer(nstars) + 1
for nq.i in range(GALSIZE):
@@
-3522,7
+3523,7
@@
def prouts(proutsline):
def cgetline():
"Get a line of input."
if game.options & OPTION_CURSES:
def cgetline():
"Get a line of input."
if game.options & OPTION_CURSES:
- linein = c
urwnd.getstr(
) + "\n"
+ linein = c
odecs.decode(curwnd.getstr()
) + "\n"
curwnd.refresh()
else:
if replayfp and not replayfp.closed:
curwnd.refresh()
else:
if replayfp and not replayfp.closed:
@@
-5358,7
+5359,6
@@
def sectscan(goodScan, i, j):
'T':LIGHTRED,
'@':LIGHTGREEN,
'P':LIGHTGREEN,
'T':LIGHTRED,
'@':LIGHTGREEN,
'P':LIGHTGREEN,
- '?':MAGENTA,
}.get(game.quad[i][j], DEFAULT))
proutn("%c " % game.quad[i][j])
textcolor(DEFAULT)
}.get(game.quad[i][j], DEFAULT))
proutn("%c " % game.quad[i][j])
textcolor(DEFAULT)