def start_game(game_name, in_queue, ne_queue, game_picked): print repr(game_picked) token = Token(game_picked[1], in_queue, ne_queue) in_queue.put(" ".join(["index", str(token.ring.index)])) playerlist = [None, None, None, None, None, None, None, None] color = ['red', 'blue', 'green', 'purple', 'yellow', 'cyan', 'black', 'orange'] tokencounter = 0 while tokencounter < 5: got = ne_queue.get(True) ident, mesg, index = got.split(" ", 2) if (mesg == "token"): tokencounter = tokencounter + 1 else: p = player.player(ident, color[int(index)], 3) playerlist[int(index)] = p if (ident == token.identifier): this_player = p playerlist = [x for x in playerlist if x != None] output.graphics.initGraphics() graphics = output.graphics.graphicalLevel(this_player) llevel = level.simple() options = dict() iinput = input.input(graphics.screen, 'input/options.ini', in_queue, this_player.UUID, 0) eengine = engine.engine(graphics, llevel, playerlist, ne_queue, options) graphics.buildLists(eengine.gamestate) eengine.inputqueuehandler.handle(iinput) sys.quit()
def start_game(game_name, in_queue, ne_queue, game_picked): print repr(game_picked) token = Token(game_picked[1], in_queue, ne_queue) in_queue.put(" ".join(["index", str(token.ring.index)])) playerlist = [None, None, None, None, None, None, None, None] color = [ 'red', 'blue', 'green', 'purple', 'yellow', 'cyan', 'black', 'orange' ] tokencounter = 0 while tokencounter < 5: got = ne_queue.get(True) ident, mesg, index = got.split(" ", 2) if (mesg == "token"): tokencounter = tokencounter + 1 else: p = player.player(ident, color[int(index)], 3) playerlist[int(index)] = p if (ident == token.identifier): this_player = p playerlist = [x for x in playerlist if x != None] output.graphics.initGraphics() graphics = output.graphics.graphicalLevel(this_player) llevel = level.simple() options = dict() iinput = input.input(graphics.screen, 'input/options.ini', in_queue, this_player.UUID, 0) eengine = engine.engine(graphics, llevel, playerlist, ne_queue, options) graphics.buildLists(eengine.gamestate) eengine.inputqueuehandler.handle(iinput) sys.quit()
__author__ = 'Isaiah' from engine import engine engine.engine(10, 5, 5)