diff options
Diffstat (limited to 'js/mapspecs.js')
-rw-r--r-- | js/mapspecs.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js index 43e6c56..e1def28 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -353,10 +353,14 @@ function doanimate(x, y, p, c, mapid, pathNumber) { //Display movecount
- if (mapdata[mapid].moveCount[1] > 0 && mapdata[mapid].moveCount[0] > 0)
- updateDsp(mapid, 'dspCount', mapdata[mapid].moveCount[0] + ' + ' + mapdata[mapid].moveCount[1] + ' = ' + count[mapid] + " moves");
- else
+ if (mapdata[mapid].moveCount[1] > 0 && mapdata[mapid].moveCount[0] > 0) {
+ var colorScores = '<span class="green">' + mapdata[mapid].moveCount[0] + '</span> + ';
+ colorScores += '<span class="red">' + mapdata[mapid].moveCount[1] + '</span> = ' + count[mapid] + " moves";
+ updateDsp(mapid, 'dspCount', colorScores);
+ //updateDsp(mapid, 'dspCount', '<span class="green">' + mapdata[mapid].moveCount[0] + ' + ' + mapdata[mapid].moveCount[1] + ' = ' + count[mapid] + " moves");
+ } else {
updateDsp(mapid, 'dspCount', count[mapid]+ " moves");
+ }
//document.getElementById(mapid+',dspCount').innerHTML = count[mapid]+ " moves";
//Get a handle on the element.
|