fix bugs in check_status method and add test for end_game method.