def addResultPlayer( player, faresult, score):
if player in self.gameFaResult :
if gameFaResult[player] == "score" :
# the play got not decicive result yet, so we can apply it.
gameFaResult[player] = faresult
#self.gameResult[player] = score
else :
if faresult == "defeat" and gameFaResult[player] == "victory" :
if not player in self.invalidPlayers :
invalidPlayers.append(player)
#if we try to set a defeat, but the player was victory.. We've got a disparity problem !
#
else :
if faresult != "score" :
self.gameFaResult[player] = faresult
if faresult == "defeat" :
gameResult[player] = -1
if faresult == "victory" :
gameResult[player] = 1
if faresult == "draw" :
gameResult[player] = -1
else :
gameFaResult[player] = faresult
gameResult[player] = score
if faresult == "defeat" :
gameResult[player] = -1
Statistics: Posted by Ze_PilOt — 05 Jul 2012, 09:26
Statistics: Posted by noobymcnoobcake — 15 Jun 2012, 19:32
Statistics: Posted by Koecher — 15 Jun 2012, 19:16
Statistics: Posted by Fok — 15 Jun 2012, 15:48
Statistics: Posted by noobymcnoobcake — 15 Jun 2012, 15:33