From c342a9a8443fd0dd146341582b2d6faa3d22e70f Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Sun, 10 Mar 2013 01:06:12 -0800 Subject: Tutorial and FAQ Hack-fix. --- pages/faq.php | 41 ++++++++++++++++++++++++++++------------- pages/tutorial.php | 42 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 62 insertions(+), 21 deletions(-) (limited to 'pages') 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');
-Your question not here? Ask me via the Feedback Page. - -

Questions and Answers

+

Questions and Answers

+Your question not here? Ask me via the Feedback Page. +  

How does the pathing work?

@@ -92,7 +97,7 @@ This means that the path will go UP as far as it can first – then right, d
If you answered "uhhmm.. what's up with the directions in caps?" then you get a bonus point!
Remember, teleports are traps and do not effect the path choice.

Demo 1

- +

@@ -115,7 +120,7 @@ Likewise, the Red Path noted by red in the arrow may pass over Red Allow blocks:

Demo 2

- +

@@ -132,7 +137,7 @@ When there's more than one checkpoint, you can completely wall one off.
The below demo demonstrates it's greed. - The path will actually be shorter if you wall the bottom A!

Demo 3

- +

@@ -183,7 +188,17 @@ But, you cannot mathmatically PROVE your solution is the best. And for this same

- \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 "\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 @@ @@ -7,6 +12,9 @@ htmlHeader(array('tutorial'), 'Pathery', 'Compete to create the longest maze pos '; -echo DisplayMap($map1, 1, 'puzzle'); +//echo DisplayMap($map1, 1, 'puzzle'); echo ''; +$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 "\n"; + + ?>
-- cgit v1.2.3