Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OO-LandCreatureHellCreature-redundancy.swift
class Creature {
let name: String
init(name: String) {
self.name = name
}
func fight() {
print("๐Ÿ‘Š")
}
}
class LandCreature: Creature {
func walk() {
print("๐Ÿšถ๐Ÿปโ€โ™€๏ธ")
}
func run() {
print("๐Ÿƒ๐Ÿป")
}
}
class HellCreature: Creature {
func walk() {
print("๐Ÿšถ๐Ÿปโ€โ™€๏ธ")
}
func run() {
print("๐Ÿƒ๐Ÿป")
}
func burn() {
print("๐Ÿ”ฅ")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment