Ejemplo n.º 1
0
def draft_temp():
        pock = int(session['pock'])
	username = session['user'] 
        iter = 1
        teamList = []
        for t in range(10):
                teamList.append([])
        tplayers = playerdefs.setDustyValues(username,pock,playerdefs.setValues(pock,playerdefs.getList(username)),teamList[pock-1])
        players = playerdefs.setSelfie(tplayers)
        if int(pock) == int(iter):
                tteam = teamList
                tplayers = sorted(players,key=playerdefs.getKeyD)
        else:
                tteam = teamList
                tplayers = sorted(players,key=playerdefs.getKeyMC)
        round = int(iter-1)/10 + 1
        players=[e.serialize() for e in tplayers]
        team = []
        for lop in tteam:
                team.append([e.serialize() for e in lop])
        return jsonify(iter=iter,round=round,team=team,players=players)
Ejemplo n.º 2
0
def mock_temp():
	pock = int(session['pock'])
	lamb = int(session['lamb'])
	username = session['user']
	iter = 1
	teamList = []
	for t in range(10):
		teamList.append([])
	tplayers = playerdefs.setDustyValues(username,pock,playerdefs.setValues(pock,playerdefs.getList(username)),teamList[pock-1])
	players = playerdefs.setSelfie(tplayers)
	pRem = mockery(iter,pock,lamb,teamList,players)
	players = pRem['players']
	tteam = pRem['team']
	iter = pRem['iter']
	tplayers = sorted(players,key=playerdefs.getKeyD)
	round = int(iter-1)/10 + 1
	players=[e.serialize() for e in tplayers]
	team = []
	for lop in tteam:
		team.append([e.serialize() for e in lop])
	return jsonify(iter=iter,round=round,team=team,players=players)