We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa63201 commit a9caa10Copy full SHA for a9caa10
1 file changed
java/examples/Topics/Advanced Data/IntListLottery/IntListLottery.pde
@@ -67,10 +67,8 @@ void draw() {
67
// One every 30 frames we pick a new lottery number to go in results
68
if (frameCount % 30 == 0) {
69
if (results.size() < 5) {
70
- // Get the first value in the lottery list
71
- int val = lottery.get(0);
72
- // Remove it from the lottery list
73
- lottery.remove(0);
+ // Get the first value in the lottery list and remove it
+ int val = lottery.remove(0);
74
// Put it in the results
75
results.append(val);
76
} else {
0 commit comments