diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/howtoplay.php | 6 | ||||
-rw-r--r-- | pages/tutorial.php | 57 |
2 files changed, 56 insertions, 7 deletions
diff --git a/pages/howtoplay.php b/pages/howtoplay.php index 11dc429..294e89f 100644 --- a/pages/howtoplay.php +++ b/pages/howtoplay.php @@ -17,15 +17,15 @@ include('./includes/maps.php'); //Demo nothing. $basicmapcode = '6x3.c0.r0.w9.t0.:0s.4f.0s.4f.0s.4f.'; -$basicmap = displaymap(GenerateMapByCode($basicmapcode), 1, true); +$basicmap = displaymap(GenerateMapByCode($basicmapcode), 1, 'example'); //Map Demoing the checkpoints $cpcode = "6x3.c5.r0.w9.t0.:0s.0a.2b.0f.0s.1e.2f.0s.0d.2c.0f."; -$cpmap = displaymap(GenerateMapByCode($cpcode), 2, true); +$cpmap = displaymap(GenerateMapByCode($cpcode), 2, 'example'); //Map Demoing the teleports $tpcode = "6x3.c0.r0.w5.t4.:0s.0n.2t.0f.0s.4f.0s.0u.2m.0f."; -$tpmap = displaymap(GenerateMapByCode($tpcode), 3, true); +$tpmap = displaymap(GenerateMapByCode($tpcode), 3, 'example'); ?> 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);
|