I want to end the game after "Slenderman" subclass is destroyed 20 times. I have no idea where to start, so i would appreciate any help


1 2 3 4 5 6 7 8 9 10 11 12 | if (getObjects(Slenderman. class ).isEmpty()) { "lives counter" --; if ( "lives counter" == 0 ) { // end game } else { // add new slenderman to world } } |