candy and die logic