I need to incorporate the while and for loop, even though it is not necessary. Can someone tell me where I'm going wrong, please?
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) public class BabySpawner extends Actor { private int x = 0; int counter = 0; public boolean SpaceShip = true; public void act() { counter++; while(counter > 50 && deathcheck() = true) { if(counter == 50) { for (int x=0; x<3; x++) { aestroid aestroid = new aestroid(); getWorld().addObject(aestroid,(int)(Math.random()*100),(int)(Math.random()*600)); } counter = 0; } } } public void deathcheck() { if ((SpaceShip.class) = null) { return false; } } }