my score isn't working it only goes up once but then stops. Everything else works. Any ideas?
/** * Act - do whatever the alien wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { movement(); if (isTouching(bullet.class)) { die(); } if (Greenfoot.getRandomNumber(1000) < 2) { fire(); } if (deathCount == 18) { Greenfoot.setWorld( new WIN()); } } public void movement() { if (Greenfoot.getRandomNumber(100) >= 50) { setRotation(180); move(3); } else { setRotation(0); move(3); } } private int deathCount = 0; private int score = 0; public void die() { removeTouching(bullet.class); deathCount = deathCount + 1; score = score + 100; getWorld().showText(Integer.toString(score), 500, 26); getWorld().removeObject(this); } public void fire() { getWorld().addObject( new alienbullet(), getX(), getY()); }