Commit 8ead5082 authored by ogomez92's avatar ogomez92

fix scoring in go

parent ecbe4964
......@@ -863,6 +863,7 @@ pongtimer.restart();
}
}
export async function playGo() {
sos();
let going=new GoGame();
await going.init();
}
......@@ -933,7 +934,7 @@ this.newTurn();
else if (this.elapsedTime>1950 && this.elapsedTime<2000) {
let timeDisplay=this.elapsedTime/1000;
timeDisplay=timeDisplay.toFixed(2);
let scoreFormula=Math.round(2000-this.elapsedTime);
let scoreFormula=Math.round(100-(2000-this.elapsedTime));
this.curscore=scoreFormula;
this.pool.playStatic("go_ok",0);
this.combo++;
......@@ -952,7 +953,7 @@ this.newTurn();
else if (this.elapsedTime>2000 && this.elapsedTime<2050) {
let timeDisplay=this.elapsedTime/1000;
timeDisplay=timeDisplay.toFixed(2);
let scoreFormula=Math.round(this.elapsedTime-2000);
let scoreFormula=Math.round(100-(this.elapsedTime-2000));
this.combo++;
this.curscore=scoreFormula;
this.pool.playStatic("go_ok",0);
......@@ -991,8 +992,12 @@ this.turns--;
this.notify=0;
if (this.turns<1) {
new ScrollingText(strings.get("goOver",[this.score,this.maxTurns]),"\n",()=> {
addCash(this.score,0,()=> {
so.kill(()=> {
st.setState(2);
});
});
});
}
else {
this.time.restart();
......
......@@ -15,7 +15,7 @@ goEarly:"Too early! you pressed enter at %1 seconds. You have %2 turns left.",
goExact:"Very good! You pressed at exactly 3 seconds. 1 extra turn + 1000 points!",
goOk:"ok, not bad. You pressed enter at %1 seconds. You get %2 points! You have %3 turns left.",
goOver:"Game over! You scored %1 points, in %2 turns. Do you think you can do better next time?",
goIntro:"Are you ready to play ready set go? When you hear the countdown, press enter when you think 3 seconds have passed!",
goIntro:"Are you ready to play ready set go? When you hear the countdown, press space when you think 3 seconds have passed!",
newUpdate:"There is a new version available! You have version %1, version %2 is available.",
macwarning:"Warning: On a mac, please press vo left arrow followed by vo right arrow, or you will have no speech.",
pongend:"You got %1 keys and missed %2.",
......@@ -301,7 +301,7 @@ mEdit:"Pack Editor",
goEarly:"Demasiado pronto! has pulsado enter a los %1 segundos... Te quedan %2 turnos.",
goOk:"Bueno, ok. Has pulsado a los %1 segundos. Ganas %2 puntos! Te quedan %3 turnos.",
goExact:"Bien! Has pulsado a los 3 segundos exactos! Turno extra y 1000 puntos!",
goIntro:"Preparado para jugar a preparados listos ya? cuando oigas el contador, pulsa enter a la de tres!",
goIntro:"Preparado para jugar a preparados listos ya? cuando oigas el contador, pulsa espacio a la de tres!",
newUpdate:"Hay una nueva versión disponible! Tienes la %1 y la %2 está disponible.",
macwarning:"Atención: En un mac, por favor pulsa control opción flecha izquierda seguido de control opción derecha o no tendrás voz.",
mReader:"Usar tu lector de pantalla para el juego",
......
Make tutorial for react and gogame
achievements for goGame
\ No newline at end of file
achievements for goGame
fix the scoring mechanism.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment