-
Notifications
You must be signed in to change notification settings - Fork 1
/
roomfunctions.js
50 lines (49 loc) · 887 Bytes
/
roomfunctions.js
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
<script type = "text/javascript">
/////////////////////////////////////////////////
if (room == 0 && /y/i.test(answer))
{
number = 1;
room = 1;
}
/////////////////////////////////////////////////
if (room == 1 && /(stand)|(get)|(up)/i.test(answer))
{
number = 2;
room = 1;
}
if (room == 1 && /(look)|(around)|(search)/i.test(answer))
{
number = 3;
room = 1;
}
if (room == 1 && /(find a)|(light)|(lamp)/i.test(answer))
{
number = 4;
room = 1;
}
if (room == 1 && /(turn)|(on)/i.test(answer))
{
number = 5;
room = 2;
}
/////////////////////////////////////////////////
if (room == 2 && /(stand)|(get)|(up)/i.test(answer))
{
number = 2;
room = 1;
}
if (room == 2 && /(look)|(around)|(search)/i.test(answer))
{
number = 3;
room = 1;
}
if (room == 2 && /(find a)|(light)|(lamp)/i.test(answer))
{
number = 4;
room = 1;
}
if (room == 2 && /(turn)|(on)/i.test(answer))
{
number = 5;
room = 2;
}