From 5fa340a564ba5bf958cdba2fe621aed80090af54 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 8 Nov 2011 19:26:07 -0800 Subject: Tutorial map series added. --- pages/tutorial.php | 158 ++++++++++++++++++++++------------------------------- 1 file changed, 65 insertions(+), 93 deletions(-) diff --git a/pages/tutorial.php b/pages/tutorial.php index 3a12d32..f40845f 100644 --- a/pages/tutorial.php +++ b/pages/tutorial.php @@ -5,17 +5,10 @@ htmlHeader(array('tutorial')); - path between the start an Previous | Next "; - - -$example1[] = "sraooroooof"; -$example1[] = "sorooroorof"; -$example1[] = "sooroooroof"; -$example1[] = "sooorrrooof"; -$example1[] = "sooooooooof"; - +//Prepare maps. +$example1[] = "sraoorooof"; +$example1[] = "sorooroorf"; +$example1[] = "soorooorof"; +$example1[] = "sooorrroof"; +$example1[] = "soooooooof"; $myparams['teleports'] = 0; $myparams['walls'] = 0; +$map1 = GenerateShapedMap($example1, $myparams); -$examplemap = GenerateShapedMap($example1, $myparams); - - -$challenge1[] = "sooraooof"; -$challenge1[] = "sooorooof"; -$challenge1[] = "sooooooof"; -$challenge1[] = "sooooooof"; -$challenge1[] = "sooooooof"; - -$myparams['checkpoints'] = 1; -$myparams['teleports'] = 0; -$myparams['walls'] = 2; - -$map1 = GenerateShapedMap($challenge1, $myparams); - -$challenge2[] = "soooaroof"; +$challenge2[] = "sooraooof"; +$challenge2[] = "sooorooof"; $challenge2[] = "sooooooof"; $challenge2[] = "sooooooof"; $challenge2[] = "sooooooof"; -$challenge2[] = "sooooooof"; -$myparams['checkpoints'] = 2; +$myparams['checkpoints'] = 1; $myparams['teleports'] = 0; -$myparams['walls'] = 4; +$myparams['walls'] = 2; $map2 = GenerateShapedMap($challenge2, $myparams); - $challenge3[] = "soooraoof"; $challenge3[] = "sooooroof"; $challenge3[] = "sooooooof"; @@ -213,36 +181,40 @@ $map3 = GenerateShapedMap($challenge3, $myparams); $challenge4[] = "suooooatoof"; $challenge4[] = "sooooooooof"; $challenge4[] = "sooooooooof"; -$challenge4[] = "sooooooooof"; +$challenge4[] = "sooooooorof"; $challenge4[] = "sooooooooof"; $challenge4[] = "sooooooooof"; $myparams['checkpoints'] = 1; $myparams['teleports'] = 1; -$myparams['walls'] = 5; +$myparams['walls'] = 4; $map4 = GenerateShapedMap($challenge4, $myparams); +$challenge5[] = "soooaobtorf"; +$challenge5[] = "soocrooooof"; +$challenge5[] = "souooooooof"; +$challenge5[] = "sooooooooof"; +$challenge5[] = "sooooooooof"; +$myparams['checkpoints'] = 3; +$myparams['teleports'] = 1; +$myparams['walls'] = 5; +$map5 = GenerateShapedMap($challenge5, $myparams); -echo DisplayMap($examplemap, 0, 'puzzle'); -echo "
"; + +//Display maps. +echo "
Target: 35 moves."; echo DisplayMap($map1, 1, 'puzzle'); -echo "
"; +echo "
Target: 18 moves."; echo DisplayMap($map2, 2, 'puzzle'); -echo "
"; +echo "
Target: 64 moves."; echo DisplayMap($map3, 3, 'puzzle'); -echo "
"; +echo "
Target: 45 moves."; echo DisplayMap($map4, 4, 'puzzle'); +echo "
Target: 75 moves."; +echo DisplayMap($map5, 5, 'puzzle'); echo "
"; -//echo "
map2
"; -echo "
"; -//echo DisplayMap($map2, 2); -//$mysolution = getSolution($userID, $mapID); -//$solutiondiv .= " -- cgit v1.2.3