further fix the bug
This commit is contained in:
@ -171,8 +171,9 @@ def ATest():
|
|||||||
# check the output
|
# check the output
|
||||||
print(lines)
|
print(lines)
|
||||||
total_round+=1
|
total_round+=1
|
||||||
if lines[0]=='YOU WIN!\n':
|
if len(lines)>0:
|
||||||
win_round+=1
|
if lines[0]=='YOU WIN!\n':
|
||||||
|
win_round+=1
|
||||||
print("win rate: "+str(win_round/total_round),win_round,total_round)
|
print("win rate: "+str(win_round/total_round),win_round,total_round)
|
||||||
return win_round/total_round
|
return win_round/total_round
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user