From 22b37fa96790b7911d4d8af95809340f68ea5820 Mon Sep 17 00:00:00 2001 From: Daniel Shiffman Date: Mon, 3 Jun 2013 13:21:18 -0400 Subject: [PATCH] using remove() properly now in IntList example --- .../Topics/Advanced Data/IntListLottery/IntListLottery.pde | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/java/examples/Topics/Advanced Data/IntListLottery/IntListLottery.pde b/java/examples/Topics/Advanced Data/IntListLottery/IntListLottery.pde index c8ab72a36..de8910825 100644 --- a/java/examples/Topics/Advanced Data/IntListLottery/IntListLottery.pde +++ b/java/examples/Topics/Advanced Data/IntListLottery/IntListLottery.pde @@ -67,10 +67,8 @@ void draw() { // One every 30 frames we pick a new lottery number to go in results if (frameCount % 30 == 0) { if (results.size() < 5) { - // Get the first value in the lottery list - int val = lottery.get(0); - // Remove it from the lottery list - lottery.remove(0); + // Get the first value in the lottery list and remove it + int val = lottery.remove(0); // Put it in the results results.append(val); } else {