finish game functional.