Any help is appreciated thanks.
package com.codegym.games.spaceinvaders;
import com.codegym.engine.cell.*;
import java.util.List;
import java.util.ArrayList;
import com.codegym.games.spaceinvaders.gameobjects.*;
public class SpaceInvadersGame extends Game {
public static final int WIDTH = 64;
public static final int HEIGHT = 64;
private List<Star> stars;
public void initialize()
{
setScreenSize(WIDTH, HEIGHT);
createGame();
}
private void createGame() {
createStars();
drawScene();
}
private void drawScene() {
drawField();
}
private void drawField() {
for (int x = 0; x < WIDTH; x++)
{
for (int y = 0; y < HEIGHT; y++)
{
setCellValueEx(x, y, Color.BLACK, "");
}
}
for (Star star : stars)
{
game.draw(this);
}
}
private void createStars() {
stars = new ArrayList<Star>();
Star star1 = new Star(63, 45);
Star star2 = new Star(60, 41);
Star star3 = new Star(53, 45);
Star star4 = new Star(43, 42);
Star star5 = new Star(57, 40);
Star star6 = new Star(65, 49);
Star star7 = new Star(61, 40);
Star star8 = new Star(55, 44);
stars.add(star1);
stars.add(star2);
stars.add(star3);
stars.add(star4);
stars.add(star5);
stars.add(star6);
stars.add(star7);
stars.add(star8);
}
}