diff options
-rw-r--r-- | pages/faq.php | 41 | ||||
-rw-r--r-- | pages/tutorial.php | 42 |
2 files changed, 62 insertions, 21 deletions
diff --git a/pages/faq.php b/pages/faq.php index 7a6ece0..01a567b 100644 --- a/pages/faq.php +++ b/pages/faq.php @@ -8,6 +8,7 @@ echo soundManager2(); topbar($Links);
include_once('./includes/maps.php');
+include_once('./includes/mapclass.php');
include_once('./includes/playerStats.php');
@@ -27,8 +28,8 @@ $myparams['rockchance'] = 999; $myparams['walls'] = 999;
$myparams['name'] = 'Pathing Demo 1';
-$map = GenerateShapedMap($pathing1, $myparams);
-$demo1 = displaymap($map, 1, 'example');
+$map1 = GenerateShapedMap($pathing1, $myparams);
+//$demo1 = displaymap($map, 1, 'example');
// --------- DEMO2
$multi1[] = 'sooXoooooXo';
$multi1[] = 'xxxXrrorxoo';
@@ -42,8 +43,8 @@ $myparams['rockchance'] = 999; $myparams['walls'] = 999;
$myparams['name'] = 'Pathing Demo 2';
-$map = GenerateShapedMap($multi1, $myparams);
-$demo2 = displaymap($map, 2, 'example');
+$map2 = GenerateShapedMap($multi1, $myparams);
+//$demo2 = displaymap($map, 2, 'example');
// --------- DEMO3
$greed[] = 'soooooooa';
$greed[] = 'sooooooob';
@@ -57,8 +58,12 @@ $myparams['rockchance'] = 999; $myparams['walls'] = 999;
$myparams['name'] = 'Pathing Demo 2';
-$map = GenerateShapedMap($greed, $myparams);
-$demo3 = displaymap($map, 3, 'example');
+$map3 = GenerateShapedMap($greed, $myparams);
+//$demo3 = displaymap($map, 3, 'example');
+
+$mapObjects[1] = new map(GenerateMapCode($map1));
+$mapObjects[2] = new map(GenerateMapCode($map2));
+$mapObjects[3] = new map(GenerateMapCode($map3));
?>
@@ -66,9 +71,7 @@ $demo3 = displaymap($map, 3, 'example'); <div class="wrapper">
-Your question not here? Ask me via the <a href='feedback'>Feedback Page</a>.
-
-<h2>Questions and Answers</h2>
+<h2 style='margin-top:65px;'>Questions and Answers</h2>
<ul>
<li><a href='#pathing'>How does the pathing work? / How does it choose which way to go?</a></li>
<li><a href='#multipath'>How does Multi-path work? (Two paths at once)</a></li>
@@ -77,6 +80,8 @@ Your question not here? Ask me via the <a href='feedback'>Feedback Page</a>. <li><a href='#cheaters'>Can players cheat?</a></li>
<li><a href='#themesong'>Does Pathery have a theme song?</a></li>
</ul>
+Your question not here? Ask me via the <a href='feedback'>Feedback Page</a>.
+
<a name='pathing'> </a>
<h3>How does the pathing work?</h3>
@@ -92,7 +97,7 @@ This means that the path will go UP as far as it can first – then right, d <br />If you answered "uhhmm.. what's up with the directions in caps?" then you get a bonus point!
<br />Remember, teleports are traps and do not effect the path choice.
<h3>Demo 1</h3>
-<? echo $demo1; ?>
+<div id='demo-1'></div>
<div style='clear:both'></div>
</p>
@@ -115,7 +120,7 @@ Likewise, the Red Path noted by red in the arrow may pass over Red Allow blocks: <div class='grid_td_rockxpath1' style='display: inline-block'></div>
<br />
<h3>Demo 2</h3>
-<? echo $demo2; ?>
+<div id='demo-2'></div>
<div style='clear:both'></div>
<hr width='60%' />
@@ -132,7 +137,7 @@ When there's more than one checkpoint, you can completely wall one off. <br />The below demo demonstrates it's greed. - The path will actually be shorter if you wall the bottom A!
<h3>Demo 3</h3>
-<? echo $demo3; ?>
+<div id='demo-3'></div>
<div style='clear:both'></div>
<hr width='60%' />
@@ -183,7 +188,17 @@ But, you cannot mathmatically PROVE your solution is the best. And for this same <br /><br />
</div>
-
<?php
+
+echo "<script>\n";
+foreach ($mapObjects as $key => $mapObject) {
+ $mapObject->ID = $key;
+ $mapObject->isChallenge = true;
+ $mapJSON = json_encode($mapObject);
+ echo "$('#demo-$key').html(mapAsHTML(decryptJSON('$mapJSON')));\n";
+}
+echo "</script>\n";
+
+
htmlFooter();
?>
diff --git a/pages/tutorial.php b/pages/tutorial.php index 10e5372..41151cd 100644 --- a/pages/tutorial.php +++ b/pages/tutorial.php @@ -1,5 +1,10 @@ <?php
-htmlHeader(array('tutorial'), 'Pathery', 'Compete to create the longest maze possible. 4 New maps every day at 9 PM Pacific', array('scores') );
+htmlHeader(
+ array('tutorial'), 'Pathery',
+ 'Start Here - Pathery Tutorial',
+ array('scores', 'dateformat') );
+
+
?>
<body>
@@ -7,6 +12,9 @@ htmlHeader(array('tutorial'), 'Pathery', 'Compete to create the longest maze pos <?php
topbar($Links);
+include_once ('./includes/maps.php');
+include_once ('./includes/mapclass.php');
+
//TODO: Turn this into a function?
if ($accepted) {
@@ -265,8 +273,6 @@ TutorialView.prototype.unlock = function(n) { </script>
<?php
-include('./includes/maps.php');
-//include('./includes/datas.php');
//Page Load;
//STAGE 1:
@@ -349,17 +355,37 @@ $map5 = GenerateShapedMap($challenge5, $myparams); //Display maps.
echo '<div id="tut-1" class="hidden">';
-echo DisplayMap($map1, 1, 'puzzle');
+//echo DisplayMap($map1, 1, 'puzzle');
echo '</div><div id="tut-2" class="hidden">';
-echo DisplayMap($map2, 2, 'puzzle');
+//echo DisplayMap($map2, 2, 'puzzle');
echo '</div><div id="tut-3" class="hidden">';
-echo DisplayMap($map3, 3, 'puzzle');
+//echo DisplayMap($map3, 3, 'puzzle');
echo '</div><div id="tut-4" class="hidden">';
-echo DisplayMap($map4, 4, 'puzzle');
+//echo DisplayMap($map4, 4, 'puzzle');
echo '</div><div id="tut-5" class="hidden">';
-echo DisplayMap($map5, 5, 'puzzle');
+//echo DisplayMap($map5, 5, 'puzzle');
echo '</div>';
+$mapObj1 = new map(GenerateMapCode($map1));
+$mapObj1->ID = 1;
+$mapObj1 = json_encode($mapObj1);
+
+$mapObjects[1] = new map(GenerateMapCode($map1));
+$mapObjects[2] = new map(GenerateMapCode($map2));
+$mapObjects[3] = new map(GenerateMapCode($map3));
+$mapObjects[4] = new map(GenerateMapCode($map4));
+$mapObjects[5] = new map(GenerateMapCode($map5));
+
+echo "<script>\n";
+foreach ($mapObjects as $key => $mapObject) {
+ $mapObject->ID = $key;
+ $mapObject->isChallenge = true;
+ $mapJSON = json_encode($mapObject);
+ echo "$('#tut-$key').html(mapAsHTML(decryptJSON('$mapJSON')));\n";
+}
+echo "</script>\n";
+
+
?>
<div class="wrapper">
|