Exemple #1
0
def createPlayer():
    for i in range(playerNum):
        aplayer = people.creatPlayer(i)
        sockets.append(aplayer.sock)
        players.append(aplayer)
        print('-------------------create player %d succeed-------------------' % i)
    print('-------------------------create %d player in players[]-------------------------' % len(players))
Exemple #2
0
def createPlayer():
    for i in range(playerNum):
        aplayer = people.creatPlayer(i)
        sockets.append(aplayer.sock)
        players.append(aplayer)
        print('-------------------create player %d succeed-------------------' % i)
    print('-------------------------create %d player in players[]-------------------------' % len(players))
Exemple #3
0
def createPlayer(group):
    for i in range(aGroup):
        try:
            aplayer = people.creatPlayer(i + (group - 1) * aGroup)
            sockets[i + (group - 1) * aGroup] = aplayer.sock
            players[i + (group - 1) * aGroup] = aplayer
            print('··················create player %d succeed··················'
                  % (i + (group - 1) * aGroup))
        except Exception as e:
            print('#####################################################################################', e)