i get a terminal window because of the line of code at rule 16. does anyone know how to fix this? when i remove rule 18 it works fine but i need that rule in my code
public class Kogel extends Actor { /** * Act - do whatever the Kogel wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { doeKogelDingen(); vermoordMonster(); vermoordNachtbaas(); } public void vermoordMonster() { Actor monster = getOneIntersectingObject(Monsters.class); if (monster != null) { updateScoreLevel1(); getWorld().removeObject(monster); getWorld().removeObject(this); } } public void vermoordNachtbaas() { Actor nachtbaas = getOneIntersectingObject(Nachtbaas.class); if (nachtbaas != null) { updateScoreLevel2(); getWorld().removeObject(this); } } public void doeKogelDingen() { move(4); } private void updateScoreLevel1() { Level1 level1 = (Level1) getWorld(); Score score = level1.pakScore(); score.bumpCount(1); } private void updateScoreLevel2() { Level2 level2 = (Level2) getWorld(); Score2 score2 = level2.pakScore2(); score2.bumpCount2(1); } }