game knows when it is over.