summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-12-21 16:11:05 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2018-12-21 16:11:05 +0000
commit1462e66b5a32deb394d7a586fe468d9edb18c969 (patch)
tree3e3203f589c55902b3aef9182484dfc5d5d5875b
parentFix up menu (diff)
downloadtoy-1462e66b5a32deb394d7a586fe468d9edb18c969.zip
Fix use of collection.take in playTake
-rw-r--r--scripts/toy.groovy3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index 3e1334d..ea85504 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -1043,8 +1043,7 @@ def sessionPlay = {
};
def playTake = { amount, activities, use = null ->
Collections.shuffle(activities);
- activities.take(amount);
- activities.each {
+ activities.take(amount).each {
if (!sessionAborted) {
apply(it, use);
}