1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Deal MS Deals up to 1<<31.

This commit is contained in:
Shlomi Fish 2012-06-06 01:11:27 +03:00
parent 0d444b407d
commit 9cec5cae00
2 changed files with 4 additions and 2 deletions

View file

@ -157,10 +157,12 @@ def init():
try:
kw = {'shell': True,
'stdout': subprocess.PIPE,
'stderr': subprocess.PIPE}
'stderr': subprocess.PIPE,
'stdin': subprocess.PIPE,}
if os.name != 'nt':
kw['close_fds'] = True
p = subprocess.Popen(settings.FCS_COMMAND+' --help', **kw)
p.stdin.close()
if p.stdout.readline().startswith('fc-solve'):
settings.USE_FREECELL_SOLVER = True
if os.name == 'posix':

View file

@ -221,7 +221,7 @@ def constructRandom(s):
if not s:
return None
seed = long(s)
if 0 <= seed <= 32000:
if 0 <= seed < (1<<31):
return LCRandom31(seed)
return PysolRandom(seed)