summaryrefslogtreecommitdiffstats
path: root/pages/tutorial.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2011-09-15 00:41:14 -0700
committerPatrick Davison <snapwilliam@gmail.com>2011-09-15 00:41:14 -0700
commitcc2e1384904ff984208cf0236a9a5c6e957ba899 (patch)
tree78f06be19662c55bebe4aa6da1264b6efaa567d9 /pages/tutorial.php
parent5332f68b60f6c37850468ab3922936d0a12d9daf (diff)
downloadpathery-cc2e1384904ff984208cf0236a9a5c6e957ba899.tar.xz
Tutorial work
Diffstat (limited to 'pages/tutorial.php')
-rw-r--r--pages/tutorial.php57
1 files changed, 53 insertions, 4 deletions
diff --git a/pages/tutorial.php b/pages/tutorial.php
index c81c0e3..a614173 100644
--- a/pages/tutorial.php
+++ b/pages/tutorial.php
@@ -13,14 +13,15 @@ $requiredmoves = '18';
?>
<script type="text/javascript">
-ischallenge = true;
+isChallenge = true;
-function challengecomplete(mapid) {
+function challengeGo(mapid) {
var moves = mapjson[mapid].moves;
if (moves == <? echo $requiredmoves; ?>) {
flashelement('nextbtn', 15, null, 400);
updateDsp(1, 'instructions', 'Great Job!<br />Lets move on to the next shall we?')
+ //Unlock next button.
} else {
//challengehint();
updateDsp(1, 'instructions', 'As you can see, the path travels from the Start to A to Finish.<hr />Place 2 walls where it\'s flashing to make the path longer')
@@ -30,6 +31,32 @@ function challengecomplete(mapid) {
}
}
+function challengeWall(mapid) {
+ //Required walls:
+ var reqwall = new Array();
+ reqwall[0] = "3,5.";
+ reqwall[1] = "4,6.";
+
+ for(var i in reqwall) {
+ //alert(solution[mapid].indexOf(reqwall[i]));
+ if (solution[mapid].indexOf(reqwall[i]) == -1) {
+ //Failed
+ return;
+ }
+ }
+ updateDsp(1, 'instructions', 'Excellent; those wall placements look good!<hr />Press Go and see the path it takes')
+ //indexOf
+}
+
+function challengeLoad() {
+
+}
+
+function highlightElement(Eid) {
+
+}
+
+
function challengehint() {
//setTimeout("flashelement('1,3,5', 10, '#cce', 620);", 100);
//setTimeout("flashelement('1,4,6', 10, '#cce', 620);", 100);
@@ -39,6 +66,8 @@ function challengehint() {
}
+
+
</script>
<?php
@@ -47,6 +76,26 @@ include('./includes/maps.php');
include('./includes/datas.php');
+//Page Load;
+//STAGE 1:
+//Intro and Instructions; press go!
+//Lightup; Go-button.
+
+//Go is done animating and GOAL is unachieved.
+//STAGE 2:
+//Show where walls go, and/or encourage them.
+//Lightup; Wall Spots
+
+//All walls have been placed correctly.
+//STAGE 3:
+//'That looks good, try pressing Go!'
+//Lightup; Go-Button
+
+//Go is done animating, and goal is achieved:
+//STAGE 4:
+//Horray! Move on to next - highlight 'Next'
+//Lightup; Next-Button
+
?>
<div class="col2" style="text-align: center">
<br /> <br />
@@ -95,9 +144,9 @@ $myparams['walls'] = 4;
$map3 = GenerateShapedMap($challenge3, $myparams);
-echo DisplayMap($map1, 1);
+echo DisplayMap($map1, 1, 'puzzle');
echo "<br />";
-echo "<br /><center>map2</center>";
+//echo "<br /><center>map2</center>";
echo "<br />";
//echo DisplayMap($map2, 2);