Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 45 lines (36 sloc) 1.104 kb
#!/usr/bin/python3
"""
Starts the game.
"""
import sys
#import struct
from pdb import pm
from core import config
class Wrap:
"""
This class wraps a FD for buffer flushing and [eventually] prefixing
messages with there lengths
"""
def __init__(self, fd):
self.fd = fd
def write(self, data):
#data = struct.pack('!H', len(data)).decode() + '\x00' + data
self.fd.write(data)
self.fd.flush()
def __getattr__(self, item):
return getattr(self.fd, item)
if __name__ == "__main__":
sys.setrecursionlimit(50)
#prevents infinite recursive loops from wiping out original context
sys.stdout = Wrap(sys.stdout)
#ensures that output gets past wraping
print("This is QFTSOM 0.3.5. In lieu of a proper interface, use the numbers."
" Failure to do so can cause crashs.")
if config.ONLINE:
config.name = input()
#Sets player name, which is the first input if run by Socket'd
else:
print("In offline mode")
config.name = "Glycan"
import games
games.choosen_game.play()
Jump to Line
Something went wrong with that request. Please try again.