Rename Parties to Games
This commit is contained in:
parent
d3077f8fea
commit
e39a1380f4
1 changed files with 10 additions and 10 deletions
20
src/game.py
20
src/game.py
|
@ -198,7 +198,7 @@ if __name__ == '__main__':
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
recursions = args.recursions
|
recursions = args.recursions
|
||||||
parties = []
|
games = []
|
||||||
while recursions > 0:
|
while recursions > 0:
|
||||||
white_time = 0
|
white_time = 0
|
||||||
black_time = 0
|
black_time = 0
|
||||||
|
@ -219,7 +219,7 @@ if __name__ == '__main__':
|
||||||
))
|
))
|
||||||
game.push(move)
|
game.push(move)
|
||||||
|
|
||||||
parties.append([recursions, game._nbBLACK, black_time, game._nbWHITE, white_time])
|
games.append([recursions, game._nbBLACK, black_time, game._nbWHITE, white_time])
|
||||||
score = game._nbBLACK - game._nbWHITE
|
score = game._nbBLACK - game._nbWHITE
|
||||||
if score == 0:
|
if score == 0:
|
||||||
winner = "No winner"
|
winner = "No winner"
|
||||||
|
@ -241,21 +241,21 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Make somes statistics
|
# Make somes statistics
|
||||||
if args.recursions > 1:
|
if args.recursions > 1:
|
||||||
numbers = len(parties)
|
numbers = len(games)
|
||||||
black = 0
|
black = 0
|
||||||
white = 0
|
white = 0
|
||||||
total_time_black = 0
|
total_time_black = 0
|
||||||
total_time_white = 0
|
total_time_white = 0
|
||||||
null = 0
|
null = 0
|
||||||
for p in parties:
|
for g in games:
|
||||||
black += 1 if p[1] > p[3] else 0
|
black += 1 if g[1] > g[3] else 0
|
||||||
white += 1 if p[1] < p[3] else 0
|
white += 1 if g[1] < g[3] else 0
|
||||||
null += 1 if p[1] == p[3] else 0
|
null += 1 if g[1] == g[3] else 0
|
||||||
total_time_black += p[2]
|
total_time_black += g[2]
|
||||||
total_time_white += p[4]
|
total_time_white += g[4]
|
||||||
|
|
||||||
print("Stats\n---")
|
print("Stats\n---")
|
||||||
print("Parties: {} in {:>6}s".format(numbers, total_time_white + total_time_black))
|
print("Games: {} in {:>6}s".format(numbers, total_time_white + total_time_black))
|
||||||
print("Black: {:>2} | ratio: {:>6} | time: {:>8}s | engine: {}".format(
|
print("Black: {:>2} | ratio: {:>6} | time: {:>8}s | engine: {}".format(
|
||||||
black,
|
black,
|
||||||
black * 100 / numbers,
|
black * 100 / numbers,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue