add stop timer function and you can use' F12' to enter game end state