chiark
/
gitweb
/
~mdw
/
sod
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01b1aac
)
test/chimaera.sod: Make `Serpent' tickle tolerance be a slot.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 5 Jan 2016 17:18:27 +0000
(17:18 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 29 May 2016 13:40:40 +0000
(14:40 +0100)
No observable change (because nothing writes the slot).
test/chimaera.sod
patch
|
blob
|
blame
|
history
diff --git
a/test/chimaera.sod
b/test/chimaera.sod
index 644bb7400f127e818dc6eba6f8cdee321005bdaf..6d62fb647bc536415a57703156010489e719877d 100644
(file)
--- a/
test/chimaera.sod
+++ b/
test/chimaera.sod
@@
-31,11
+31,15
@@
class Goat : Animal {
}
class Serpent : Animal {
+ int limit = 2;
+
void hiss() { puts("Sssss!"); }
void bite() { puts("Nom!"); }
void nml.tickle() {
- if (SERPENT__CONV_NML(me)->nml.tickles <= 2) Serpent_hiss(me);
- else Serpent_bite(me);
+ if (SERPENT__CONV_NML(me)->nml.tickles <= me->serpent.limit)
+ Serpent_hiss(me);
+ else
+ Serpent_bite(me);
}
}