-
Notifications
You must be signed in to change notification settings - Fork 8
/
p_routes.php
46 lines (40 loc) · 1.18 KB
/
p_routes.php
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
<?php
include('config.php');
include('db.php');
include('header.txt');
function insertRoutes($id, $data){
$count = 0;
$room = db_single(mysql_query("SELECT * FROM choose_rooms WHERE id=$id"));
if ($room[end_here]){
print $data."<td bgcolor=\"#ffcccc\"><a href=\"room.php?room=$id\">$id</a></td></tr>";
$count++;
}else{
$data .= "<td bgcolor=\"#eeeeee\"><a href=\"room.php?room=$id\">$id</a></td>";
if ($room[room_1]){
$count += insertRoutes($room[room_1],$data);
}else{
print $data."<td bgcolor=\"#cccccc\">0a</td></tr>";
$count++;
}
if ($room[room_2]){
$count += insertRoutes($room[room_2],$data);
}else{
print $data."<td bgcolor=\"#cccccc\">0b</td></tr>";
$count++;
}
}
return $count;
}
?>
There are quite a few routes through the game. Here they are (read left to right). Light gray is a normal room. Dark gray is an uncompleted story line. Red is an ending.<br>
<br>
<br>
<table cellpadding="4" cellspacing="1" border="0">
<?php
$count = insertRoutes(1, '<tr>'); ?>
</table>
<br>
There are currently <?php echo $count; ?> routes through the story.
<?php
include('footer.txt');
?>