Use the original code that you posted at the beginning of THIS discussion and change line 16 to the following
and remove line 17.
1 | ((Background) getWorld()).gameOver(); |
1 | ((Background) getWorld()).gameOver(); |