Game finishing code