1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
<?PHP
htmlHeader();
?>
<body>
<?php
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', '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')
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');
include('./includes/datas.php');
?>
<div class="col2" style="text-align: center">
<br /> <br />
<strong><div style='height:80px;' id='1,instructions'>
The point of this game is to create the longest <i>path</i> between the start and the finish
<hr />Press Go!
</div>
</strong>
<br />
<?
echo "<a href='#'>Previous</a> | <a href='#' id='nextbtn'>Next</a> ";
$challenge1[] = "sooraooof";
$challenge1[] = "sooorooof";
$challenge1[] = "sooooooof";
$challenge1[] = "sooooooof";
$challenge1[] = "sooooooof";
$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'>";
//$solutiondiv .= "<div id='mapsol'>";
//$solutiondiv .= $mapID.":".$mysolution;
//$solutiondiv .= '</div>';
//echo $solutiondiv;
?>
</div>
<script type="text/javascript">soundManagerInit();</script>
</body>
</html>
|