Skip to content

Commit a9caa10

Browse files
committed
using remove() properly now in IntList example
1 parent aa63201 commit a9caa10

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

java/examples/Topics/Advanced Data/IntListLottery/IntListLottery.pde

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,8 @@ void draw() {
6767
// One every 30 frames we pick a new lottery number to go in results
6868
if (frameCount % 30 == 0) {
6969
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);
70+
// Get the first value in the lottery list and remove it
71+
int val = lottery.remove(0);
7472
// Put it in the results
7573
results.append(val);
7674
} else {

0 commit comments

Comments
 (0)