def get_game(gamekey): logging.info("finding game %s" % (gamekey, )) b = model.findBoard(gamekey) if b is None: logging.info("did not find it...") s = GameState(gamekey) if not s.isvalid(): logging.info("is not valid %s" % (gamekey, )) return None else: return s
def get_game(gamekey): logging.info("finding game %s" % (gamekey,)) b = model.findBoard(gamekey) if b is None: logging.info("did not find it...") s = GameState(gamekey) if not s.isvalid(): logging.info("is not valid %s" % (gamekey,)) return None else: return s
def __init__(self, gamekey): self.gamekey = gamekey self.board = model.findBoard(self.gamekey) self.valid = (not self.board is None)