Created
January 21, 2019 15:46
-
-
Save tsh-code/f2fbafa0613fd17aa84d83866fa1f481 to your computer and use it in GitHub Desktop.
PO-canSomething.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Creature { | |
var canFly: Bool { return self is Flying } | |
var canBurn: Bool { return self is Burning } | |
var canWalk: Bool { return self is Walking } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment