I've a function with if statement inside it, I want to check everytime person clicks, whenever the if statement returns true, I want that function to be removed or never again called, is it possible to achieve in swift?
func checkLevelUp(){
if CookieViewController.moneyLevel >= 3 && CookieViewController.bonusLevel >= 3 && CookieViewController.spinLevel >= 3 {
print("Level up !!!!!!!") // if this is printed, I never want checkLevelUp function to exists
}
}