Может я не понимаю условие?
package com.javarush.games.spaceinvaders;
import com.javarush.engine.cell.*;
import com.javarush.games.spaceinvaders.gameobjects.Star;
import java.util.ArrayList;
import java.util.List;
public class SpaceInvadersGame extends Game {
public final static int WIDTH = 64, HEIGHT = 64;
private List<Star> stars;
@Override
public void initialize() {
setScreenSize(WIDTH, HEIGHT);
createGame();
}
private void drawField() {
for (int x = 0; x < WIDTH; x++) {
for (int y = 0; y < HEIGHT; y++) {
setCellValueEx(x, y, Color.BLACK, "");
}
}
for (int i = 0; i < stars.size(); i++) {
stars.get(i).draw(this);
}
}
private void createGame() {
createStars();
drawScene();
}
private void drawScene() {
drawField();
}
private void createStars() {
stars = new ArrayList<Star>();
stars.add(new Star(58, 10));
stars.add(new Star(54, 7));
stars.add(new Star(54, 56));
stars.add(new Star(61, 28));
stars.add(new Star(25, 43));
stars.add(new Star(56, 61));
stars.add(new Star(13, 32));
stars.add(new Star(10, 63));
}
}