Classes in Swift


class hero {

var hp = 0
var coins = 0


init(hp:Int){

self.hp = hp
}

func removeHp(hit:Int){

hp = hp - hit
}

func addCoin(coin:Int){

coins = coins coin

}
}

let theHero = hero(hp: 100)

//theHero.hp = 100


theHero.removeHp(30)

theHero.addCoin(15)

cheap air max|cheap air jordans|pompy wtryskowe|cheap huarache shoes| bombas inyeccion|cheap jordans|cheap sneakers|wholesale jordans|cheap china jordans|cheap wholesale jordans|cheap jordans|wholesale jewelry china