check completion and end game