Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PO-Creature-Strikeable.swift
class Creature {
let name: String
init(name: String) {
self.name = name
}
}
protocol Strikeable {
func fight()
}
extension Strikeable {
func fight() {
print("👊")
}
}
extension Creature: Strikeable { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment