X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=new2%2Fplomrogue%2Fio.py;h=2283a986d10717511778b1d79aa5dca4b4919557;hb=9209d0e0f1bbc79f872ce3b2bd353f1307a7c84d;hp=12e74500eff1b7582d2a6a81601696e8076d4833;hpb=7ea66be9de28472ea2721b9170d6fe75189a4495;p=plomrogue2-experiments
diff --git a/new2/plomrogue/io.py b/new2/plomrogue/io.py
index 12e7450..2283a98 100644
--- a/new2/plomrogue/io.py
+++ b/new2/plomrogue/io.py
@@ -4,17 +4,18 @@ import queue
class GameIO():
- def __init__(self, game):
+ def __init__(self, game, save_file='savefile'):
from plomrogue.parser import Parser
self.clients = {}
self.parser = Parser(game)
self.game = game
+ self.save_file = save_file
def loop(self, q):
"""Handle commands coming through queue q, run game, send results back."""
while True:
try:
- command, connection_id = q.get(timeout=1)
+ command, connection_id = q.get(timeout=0.001)
self.handle_input(connection_id, command)
except queue.Empty:
self.game.run_tick()