Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #22 from fonkap/master
Browse files Browse the repository at this point in the history
Small bugfixes related to analysis
  • Loading branch information
lukasmonk authored Jan 2, 2017
2 parents 9f54481 + ddc426f commit 18fb696
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Code/ControlPGN.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ def actual(self):
rival = self.gestor.libro.nombre
elif tipoJuego in (kJugFics, kJugFide):
rival = self.gestor.nombreObj
else:
elif self.gestor.xrival:
rival = self.gestor.xrival.nombre
else:
rival = "";

jugador = self.gestor.configuracion.jugador
resultado = self.gestor.resultado
Expand Down
10 changes: 8 additions & 2 deletions Code/QT/Histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,14 @@ def genHistograms(partida, sicentipawns):
alm.lijgB = lijgB

alm.porcT = porcT*1.0/len(lijg)
alm.porcW = porcW*1.0/len(lijgW)
alm.porcB = porcB*1.0/len(lijgB)
if len(lijgW) != 0:
alm.porcW = porcW*1.0/len(lijgW)
else:
alm.porcW = 0;
if len(lijgB) != 0:
alm.porcB = porcB*1.0/len(lijgB)
else:
alm.porcB = 0;

return alm

Expand Down

0 comments on commit 18fb696

Please sign in to comment.