I just read about classes etc...
What I'm trying to do for my very first project in Swift.. is to make a "textfield box" and if you type in 50 or more and puss a button, it will print on the screen: "you made it" and after congrats you and proceed to level 2 = a new page.
I know I'm not close at all.. but this is what I came up with so far... (I just started to learn by myself to program... so please bare that in mind... I know this is all shit to be honest..)
So this is what I could think of:
class Shots {
let hots: UInt8
init() {
}
if hots >= 50 {
print("you made it") // also thought if it prints you made it... somehow it should use the func.sayCongrats...
} else {
print("you failed")
}
func sayCongrats() {
print("YAY! level 2")
}
}
could anybody help me out with explaining what I'm doing wrong and what I need to add.. etc..