Can someone check this?
The Shapematrix didn't create it own...So i copied ..
All the requirements are coded .But it is not passing..
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;
public static final int HEIGHT=64;
private List<Star> stars;
@Override
public void initialize()
{
setScreenSize(WIDTH,HEIGHT);
createGame();
}
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 += 8;
}
}
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, "");
}
}
for(int i=0;i<stars.size();i++)
{
stars.get(i).draw(this);
}
}
}