projects
/
the-server-room.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Scoring doesn't need global variables
[the-server-room.git]
/
the-server-room.inf
diff --git
a/the-server-room.inf
b/the-server-room.inf
index b79609ab0509b5d11561b14a0a808d403a4aee5d..2af50d38fd1ac0480759f44ea4f06ec9cbb18975 100644
(file)
--- a/
the-server-room.inf
+++ b/
the-server-room.inf
@@
-42,9
+42,6
@@
Serial "190908";
Constant MAX_SCORE = 6;
Include "parser";
Include "verblib";
Constant MAX_SCORE = 6;
Include "parser";
Include "verblib";
-Global openedbackpack = 1;
-Global openedtray = 1;
-Global takencd = 1;
Global beeping = 1;
!=========================================================================
! The Game Objects
Global beeping = 1;
!=========================================================================
! The Game Objects
@@
-117,9
+114,9
@@
Object backpack "backpack" table
article "your",
before [;
Open:
article "your",
before [;
Open:
- if (
openedbackpack == 1
) {
+ if (
backpack hasnt visited
) {
score = score + 2;
score = score + 2;
-
openedbackpack = 2
;
+
give backpack visited
;
}
],
has clothing container openable;
}
],
has clothing container openable;
@@
-132,10
+129,9
@@
Object disc "Trisquel CD" backpack
name 'disk' 'disc' 'Trisquel' 'cd',
after [;
Take:
name 'disk' 'disc' 'Trisquel' 'cd',
after [;
Take:
- if (
takencd == 1
) {
+ if (
disc hasnt visited
) {
score = score + 2;
score = score + 2;
- takencd = 2;
- print_ret "You pick up the Trisquel CD.^";
+ give disc visited;
}
],
has ;
}
],
has ;
@@
-217,9
+213,9
@@
Object tray "tray" server_room
if (noun ~= disc)
print_ret (The) noun, " is too big to fit.";
Open:
if (noun ~= disc)
print_ret (The) noun, " is too big to fit.";
Open:
- if (
openedtray == 1
) {
+ if (
tray hasnt visited
) {
score = score + 2;
score = score + 2;
-
openedtray = 2
;
+
give tray visited
;
}
],
after [;
}
],
after [;