From 15e25ed9bc50ab8f2d99037f6d88d0c5cd1441a8 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Wed, 26 Dec 2012 12:41:16 -0800 Subject: Added colors for dual-path numbers. --- js/mapspecs.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'js/mapspecs.js') 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 = '' + mapdata[mapid].moveCount[0] + ' + '; + colorScores += '' + mapdata[mapid].moveCount[1] + ' = ' + count[mapid] + " moves"; + updateDsp(mapid, 'dspCount', colorScores); + //updateDsp(mapid, 'dspCount', '' + 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. -- cgit v1.2.3