I don't really know what's wrong here.
package com.codegym.games.spaceinvaders;
import com.codegym.engine.cell.*;
import java.util.ArrayList;
import java.util.List;
import com.codegym.games.spaceinvaders.gameobjects.Star;
public class SpaceInvadersGame extends Game{
public static final int WIDTH=64,HEIGHT=64;
private List<Star> stars;
@Override
public void initialize(){
setScreenSize(WIDTH,HEIGHT);
createGame();
}
private void createGame(){
createStars();
drawScene();
}
private void drawScene(){
drawField();
}
private void drawField(){
for (int y = 0; y < HEIGHT; y++) {
for (int x = 0; x < WIDTH; x++) {
setCellValueEx(x, y,Color.BLACK,"");
}
}
}
private void drawField(Game game){
for (int i = 0; i < stars.size(); i++) {
stars.get(i).draw(this);
}
}
private void createStars(){
stars = new ArrayList<Star>();
int x=0;
int y=0;
for(int i=0; i < 8; i++){
stars.add(i, new Star(x,y));
x += 8;
y += 4;
}
}
}