Sorry, I'm new to Greenfoot (and Java for that matter). I have 10 instances of an actor (called Card). I want to know which element or index number was clicked on. Thanks.


1 2 3 4 | // with the following array (filled with Card objects) Card[] cards = new Card[ 10 ]; // you can do int index = Arrays.asList(cards).indexOf(clickedCard); |