Update puzzle logic