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

Commit

Permalink
Version 9.06
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmonk committed Jul 16, 2015
1 parent 2e497b7 commit 31b2424
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 55 deletions.
95 changes: 52 additions & 43 deletions Code/Gestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,50 +345,59 @@ def movimientosPiezas(self, liMovs, siMovTemporizado=False):
"""
Hace los movimientos de piezas en el tablero
"""
# if siMovTemporizado and self.configuracion.efectosVisuales:

# rapidez = self.configuracion.rapidezMovPiezas * 1.0 / 100.0
# cpu = self.procesador.cpu
# cpu.reset()
# segundos = None

# # primero los movimientos
# for movim in liMovs:
# if movim[0] == "m":
# if segundos is None:
# desde, hasta = movim[1], movim[2]
# dc = ord(desde[0]) - ord(hasta[0])
# df = int(desde[1]) - int(hasta[1])
# # Maxima distancia = 9.9 ( 9,89... sqrt(7**2+7**2)) = 4 segundos
# dist = ( dc ** 2 + df ** 2 ) ** 0.5
# segundos = 4.0 * dist / (9.9 * rapidez)

# cpu.muevePieza(movim[1], movim[2], siExclusiva=False, segundos=segundos)

# if segundos is None:
# segundos = 1.0

# # segundo los borrados
# for movim in liMovs:
# if movim[0] == "b":
# n = cpu.duerme(segundos * 0.80 / rapidez)
# cpu.borraPieza(movim[1], padre=n)

# # tercero los cambios
# for movim in liMovs:
# if movim[0] == "c":
# cpu.cambiaPieza(movim[1], movim[2], siExclusiva=True)

# cpu.runLineal()
if siMovTemporizado and self.configuracion.efectosVisuales:

rapidez = self.configuracion.rapidezMovPiezas * 1.0 / 100.0
cpu = self.procesador.cpu
cpu.reset()
segundos = None

# primero los movimientos
for movim in liMovs:
if movim[0] == "m":
if segundos is None:
desde, hasta = movim[1], movim[2]
dc = ord(desde[0]) - ord(hasta[0])
df = int(desde[1]) - int(hasta[1])
# Maxima distancia = 9.9 ( 9,89... sqrt(7**2+7**2)) = 4 segundos
dist = ( dc ** 2 + df ** 2 ) ** 0.5
segundos = 4.0 * dist / (9.9 * rapidez)
if self.procesador.gestor:
cpu.muevePieza(movim[1], movim[2], siExclusiva=False, segundos=segundos)
else:
return

if segundos is None:
segundos = 1.0

# segundo los borrados
for movim in liMovs:
if movim[0] == "b":
if self.procesador.gestor:
n = cpu.duerme(segundos * 0.80 / rapidez)
cpu.borraPieza(movim[1], padre=n)
else:
return

# tercero los cambios
for movim in liMovs:
if movim[0] == "c":
if self.procesador.gestor:
cpu.cambiaPieza(movim[1], movim[2], siExclusiva=True)
else:
return

if self.procesador.gestor:
cpu.runLineal()

# else:
for movim in liMovs:
if movim[0] == "b":
self.tablero.borraPieza(movim[1])
elif movim[0] == "m":
self.tablero.muevePieza(movim[1], movim[2])
elif movim[0] == "c":
self.tablero.cambiaPieza(movim[1], movim[2])
else:
for movim in liMovs:
if movim[0] == "b":
self.tablero.borraPieza(movim[1])
elif movim[0] == "m":
self.tablero.muevePieza(movim[1], movim[2])
elif movim[0] == "c":
self.tablero.cambiaPieza(movim[1], movim[2])

# Aprovechamos que esta operacion se hace en cada jugada
self.atajosRatonReset()
Expand Down
2 changes: 1 addition & 1 deletion Code/Init.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DEBUG = False
VERSION = "9.05"
VERSION = "9.06"

import sys

Expand Down
1 change: 1 addition & 0 deletions Code/QT/InfoBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def Translators(self):
_("Arabic"): ("Mohamad Alhedhed",""),
_("Dutch"): ("Willy Lefebvre",""),
_("Chinese simplified"): ("Kevin Sicong Jiang",""),
_("Turkish"): ("Mustafa Nazmi ÖZDEMIR",""),
}
def r(lng):
return Util.iniBase8dic("Locale/%s/lang.ini"%lng)["AUTHOR"]
Expand Down
Binary file modified Locale/az/LC_MESSAGES/lucaschess.mo
Binary file not shown.
Binary file modified Locale/es/LC_MESSAGES/lucaschess.mo
Binary file not shown.
Binary file added Locale/tr/LC_MESSAGES/lucaschess.mo
Binary file not shown.
3 changes: 3 additions & 0 deletions Locale/tr/lang.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NAME=Türk
AUTHOR=Mustafa Nazmi ÖZDEMİR
%=100
11 changes: 1 addition & 10 deletions Lucas.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,11 @@



"""
1. Wrong analysis label when mate. (dima d)
2. When program path includes cyrillic characters. (tserv)
3. Merging polyglot books.
4. Renaming a Personal opening guide. (Mario L)
5. Changed stockfish with a compilation valid to old pcs. (Jörg R)
6. Play like a GM, when saving to PGN. (Uli)
7. Cinnamon engine, problems working with low depths, fixed by author Giussepe Cannella. (Xema)
8. Moving pieces pressing cell, can put pieces in wrong positions. (Bolivar Gonzalez)
"""

import os
import sys


reload(sys)
sys.setdefaultencoding("latin-1")
sys.path.append(os.curdir)
Expand Down
2 changes: 1 addition & 1 deletion bug.log
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Version 9.05
Version 9.06

0 comments on commit 31b2424

Please sign in to comment.