summaryrefslogtreecommitdiffstats
path: root/pages/tutorial.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2011-09-10 01:44:35 -0700
committerPatrick Davison <snapwilliam@gmail.com>2011-09-10 01:44:35 -0700
commitf5fae4bbf7d84419cf4ecb38238bfb9bb2f911e5 (patch)
tree5d6a70ddea2a88268372ee63bcff99f13b5c05ec /pages/tutorial.php
parent33dfdb5654c3ba8fe43203e3212cefd8495cf2ea (diff)
downloadpathery-f5fae4bbf7d84419cf4ecb38238bfb9bb2f911e5.tar.xz
Tutorial started
Diffstat (limited to 'pages/tutorial.php')
-rw-r--r--pages/tutorial.php78
1 files changed, 71 insertions, 7 deletions
diff --git a/pages/tutorial.php b/pages/tutorial.php
index 1980bb5..3ce0d06 100644
--- a/pages/tutorial.php
+++ b/pages/tutorial.php
@@ -8,6 +8,39 @@ topbar($Links);
<script type="text/javascript" src="sounds/script/soundmanager.js"></script>
+<?
+$requiredmoves = '18';
+?>
+
+<script type="text/javascript">
+ischallenge = true;
+
+function challengecomplete(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?')
+ } else {
+ //challengehint();
+ updateDsp(1, 'instructions', 'Place some walls<br />What would make it travel the longest?')
+ flashelement('1,instructions', 2, '#cce', 700);
+ setTimeout("flashelement('1,3,5', 10, '#cce', 760);", 1500);
+ setTimeout("flashelement('1,4,6', 10, '#cce', 760);", 1500);
+ }
+}
+
+function challengehint() {
+ //setTimeout("flashelement('1,3,5', 10, '#cce', 620);", 100);
+ //setTimeout("flashelement('1,4,6', 10, '#cce', 620);", 100);
+ setTimeout("flashelement('1,btn', 6, '#ee4', 620);", 1500);
+ setTimeout("flashelement('1,instructions', 3, '#cce', 620);", 700);
+ //updateDsp(mapid, element, data) {
+}
+
+
+</script>
+
<?php
include('./includes/maps.php');
@@ -16,26 +49,57 @@ include('./includes/datas.php');
?>
<div class="col2" style="text-align: center">
-<p>
-Place blocks where it says to...
+<br /> <br />
+<strong><p id='1,instructions'>
+Press GO!
+<br /> &nbsp;
</p>
+</strong>
<br />
<?
-echo "<a href='#'>Previous</a> | <a href='#'>Next</a> ";
+echo "<a href='#'>Previous</a> | <a href='#' id='nextbtn'>Next</a> ";
-$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 "<br />";
+echo "<br /><center>map2</center>";
+echo "<br />";
+//echo DisplayMap($map2, 2);
//$mysolution = getSolution($userID, $mapID);
//$solutiondiv .= "<div id='mapsol' style='visibility:hidden;display:none'>";