www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit cf7054935b281ee372ddbd106d2b54b3ffd5894c
parent b059857da8bf25d0582225be749c3d170b8c269e
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Thu, 28 Apr 2011 21:03:46 +0200

Utilisation de minScore et maxScore dans le jeu (javascript) au lieu de -5 et 10 codés en dur.

Diffstat:
Mcode/serveur/php/ressources/pticlic.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/code/serveur/php/ressources/pticlic.js b/code/serveur/php/ressources/pticlic.js @@ -443,7 +443,7 @@ score.ui = function () { $("#score .scores").empty(); $("#score .scoreTotal") .text(state.game.scoreTotal) - .goodBad(-50,100,{r:255,g:0,b:0},{r:0,g:192,b:0}); + .goodBad(state.game.minScore*state.game.cloud.length,state.game.maxScore*state.game.cloud.length,{r:255,g:0,b:0},{r:0,g:192,b:0}); $.each(state.game.cloud, function(i,e) { try { $("#templates .scoreLine") @@ -453,7 +453,7 @@ score.ui = function () { .end() .find(".score") .text(e.score) - .goodBad(-5,10,{r:255,g:0,b:0},{r:0,g:192,b:0}) + .goodBad(state.game.minScore,state.game.maxScore,{r:255,g:0,b:0},{r:0,g:192,b:0}) .end() .appendTo("#score .scores"); } catch(e) {alert("Error anonymous 1 in score.ui");alert(e);}