Hi, I have a small game in which the player has to shoot targets which pop up in the windows of a house. So far, I have all the shooting etc working, but I have written the code myself for when and where the targets are being placed. I only have 4 targets which pop up at the moment, so obviously its not a very long game and I know there must be a much easier and faster way than typing out loads of code for everytime a target comes up.
So what I'm asking is if anyone could help me by showing me how I could randomly select a position from 2 arrays(one for both x and y positions) which I can then use to draw Images from.
This may seem obvious, but I'm still new to java and I'm not very good with arrays and such.
Thanks in advance to anyone who can help me, also if you need any more information I can tell you.