implemented game end event