I have a code that spawns coins for a game im working on. It works fine until i remove a coin, then the terminal window shows up because my actor is not in the world. I dont know what to do :/
Its wrote in the act() method of my world. Any advice on how to modify this code so it doesn't crash my game when i remove a coin would be great!
if (random <= 4) { addObject(new Coin(), 800, Greenfoot.getRandomNumber(400) + 1); }