Added method to determine gameover