Game freezes, upon cube space

When there is nore more space to generate new cubes the game freezes
and leave the screen as it is. Need to change the game status so that
it goes to gameover
Game State to game over

Now the app changes the game state to game over. The game over scene is
being loaded 1.5 sec after the task is beign complete.