From f5fae4bbf7d84419cf4ecb38238bfb9bb2f911e5 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Sat, 10 Sep 2011 01:44:35 -0700 Subject: Tutorial started --- index.php | 4 +++ js/mapspecs.js | 22 ++++++++++----- pages/tutorial.php | 78 +++++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 91 insertions(+), 13 deletions(-) diff --git a/index.php b/index.php index e34b0b4..7ae7bd8 100644 --- a/index.php +++ b/index.php @@ -29,6 +29,10 @@ switch (strtolower($_GET[page])) { require("pages/test.php"); break; + case "tutorial": + require("pages/tutorial.php"); + break; + case "embed": require("pages/embed.php"); break; diff --git a/js/mapspecs.js b/js/mapspecs.js index fe58658..17e4a74 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -8,6 +8,9 @@ window.onload = function(){ //document.getElementById('blocksdisplay').innerHTML = ""+blocks+""; //doSend(); loadSol(); + if (ischallenge == true) { + challengehint(); + } } var solution = new Array(); @@ -274,6 +277,9 @@ function animatePathDone(mapid) { updateDsp(mapid, 'dspScore', htmlscores); htmlscores = ''; } + if (ischallenge == true) { + challengecomplete(mapid); + } } function request_scores_done() { @@ -624,12 +630,16 @@ function doanimate(x, y, p, c, mapid) { setTimeout("doanimate("+x+","+y+",'"+p+"','"+t+"','"+mapid+"')",rs); } -function flashelement(eid, times, color) { +function flashelement(eid, times, color, speed) { //alert("exe"+eid); if (document.getElementById(eid) == undefined) return; if (!color) { color = "#FFFF44"; } + if (!speed) { + speed = 220; + } + speedon = speed * .5; //document.getElementById(eid).setAttribute('class', 'no_transition'); var currentclass = document.getElementById(eid).className; if (document.getElementById(eid).classOrigName != undefined) @@ -639,17 +649,17 @@ function flashelement(eid, times, color) { document.getElementById(eid).style.backgroundColor = '#000000'; for (var i=0; i + + + +
-

-Place blocks where it says to... +

+

+Press GO! +
 

+
Previous | Next "; +echo "Previous | Next "; -$challenge1[] = "soooraoof"; -$challenge1[] = "sooooroof"; +$challenge1[] = "sooraooof"; +$challenge1[] = "sooorooof"; $challenge1[] = "sooooooof"; $challenge1[] = "sooooooof"; $challenge1[] = "sooooooof"; -$myparams['checkpoints'] = 3; -$myparams['teleports'] = 1; +$myparams['checkpoints'] = 1; +$myparams['teleports'] = 0; $myparams['walls'] = 2; $map1 = GenerateShapedMap($challenge1, $myparams); +$challenge2[] = "soooraoof"; +$challenge2[] = "sooooroof"; +$challenge2[] = "sooooooof"; +$challenge2[] = "sooroooof"; +$challenge2[] = "soobrooof"; + +$myparams['checkpoints'] = 2; +$myparams['teleports'] = 0; +$myparams['walls'] = 4; + +$map2 = GenerateShapedMap($challenge2, $myparams); + +$challenge3[] = "soooraoof"; +$challenge3[] = "sooooroof"; +$challenge3[] = "sooooooof"; +$challenge3[] = "sooroooof"; +$challenge3[] = "soobrooof"; + +$myparams['checkpoints'] = 1; +$myparams['teleports'] = 0; +$myparams['walls'] = 4; + +$map3 = GenerateShapedMap($challenge3, $myparams); + echo DisplayMap($map1, 1); +echo "
"; +echo "
map2
"; +echo "
"; +//echo DisplayMap($map2, 2); //$mysolution = getSolution($userID, $mapID); //$solutiondiv .= "