I added this failable initializer in my Monster class, but no errors appeared when I built it pointing to my Zombie subclass, which the challenge suggests I’d need to adjust:
// gold challenge
// failable initializer
init?(town: Town?, monsterName: String?) {
guard monsterName != nil else {
return nil
}
self.town = town
self.name = monsterName ?? "\(String(describing: town?.numberOfStoplights)) Spotlights Monster"
}
Is there something wrong with my failable initializer?