Tweak
This commit is contained in:
parent
34723d6f2c
commit
eea8c8ecfe
|
@ -90,18 +90,13 @@ ground dataspace {
|
||||||
console.log("Santa is waiting for something to do.");
|
console.log("Santa is waiting for something to do.");
|
||||||
react {
|
react {
|
||||||
field this.puzzledElves = Immutable.List();
|
field this.puzzledElves = Immutable.List();
|
||||||
on asserted elfProblem($id) {
|
on asserted elfProblem($id) { this.puzzledElves = this.puzzledElves.push(id); }
|
||||||
this.puzzledElves = this.puzzledElves.push(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
field this.readyReindeer = Immutable.List();
|
|
||||||
on asserted reindeerReturned($id) {
|
|
||||||
this.readyReindeer = this.readyReindeer.push(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
stop on (this.puzzledElves.size >= elfGroupSize) {
|
stop on (this.puzzledElves.size >= elfGroupSize) {
|
||||||
talkToElves(this.puzzledElves.take(elfGroupSize));
|
talkToElves(this.puzzledElves.take(elfGroupSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
field this.readyReindeer = Immutable.List();
|
||||||
|
on asserted reindeerReturned($id) { this.readyReindeer = this.readyReindeer.push(id); }
|
||||||
stop on (this.readyReindeer.size == nReindeer) {
|
stop on (this.readyReindeer.size == nReindeer) {
|
||||||
harnessReindeer();
|
harnessReindeer();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue