I am writing a space invaders game I need to write 5 public instance variables which hold collections recording all of the information about one run of the game:
spaceShips will reference a list of SpaceShip, in the order they appeared on the screen
public List spaceShips;
blinks are shots which will reference a list of all instances of Blink in the order which they occured
public List blinks;
hitsMap which will reference a map, who keys will be instances of Spaceship that where hit by a blink and whose values will be lists corresponding 'successful' instances of blink
????
unscathed which will reference a list of all instances of SpaceShip that were not 'hit' by any blink
???
misses, which will reference a list of all instances of Blink that did not 'hit' any spaceship
???
I then have to add lines to the constructor to assign a new instance of HashMap to hits map and ArrayList to the other variables, so far i have
spaceShips = new ArrayList(); blinks = new ArrayList();
Any help would be great
cheers