Added isGameOver function()