Im trying to select a random item from an Arraylist and then set the image of an actor to the name of the random item that was chosen. This is my method:
I get an error saying cannot find symbol - method size()
1 2 3 4 5 6 7 8 9 10 11 | public void setGameScreen() { while (numCardsHand < 7 ) { Card card = new Card(); card.setImage(cardList.get(cardList.size() + 1 ) + ".png" ); getWorld().addObject(card, 400 , 225 ); numCardsHand ++; } } |