boundary detection with game over alert box and restart implemented