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
// Creature | |
class Creature : Equatable { | |
} | |
func ==(lhs: Creature, rhs: Creature) -> Bool { | |
return lhs === rhs | |
} | |
// Monster |
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
// | |
// simd+ext.swift | |
// | |
// Created by Kaz Yoshikawa on 11/6/15. | |
// | |
// | |
import Foundation | |
import simd | |
import GLKit |
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
// | |
// Geometry.swift | |
// ZKit | |
// | |
// Created by Kaz Yoshikawa on 11/6/15. | |
// | |
// | |
import Foundation | |
import CoreGraphics |
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
// | |
// String+Z.swift | |
// ZKit | |
// | |
// Created by Kaz Yoshikawa on 11/10/15. | |
// | |
// | |
import Foundation |
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
// | |
// ZGeoUtils.swift | |
// ZKit | |
// | |
// Created by Kaz Yoshikawa on 2015/02/08. | |
// Copyright (c) 2015 Electricwoods LLC. All rights reserved. | |
// | |
import Foundation | |
import CoreGraphics |
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
import Foundation | |
extension NSScanner { | |
func scanStringFromSet(strings: Set<String>) -> String? { | |
for string in strings { | |
if self.scanString(string, intoString: nil) { | |
return string | |
} | |
} |
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
for thing in things { | |
switch thing { | |
case 0 as Int: | |
print("zero as an Int") | |
case 0 as Double: | |
print("zero as a Double") | |
case let someInt as Int: | |
print("an integer value of \(someInt)") | |
case let someDouble as Double where someDouble > 0: | |
print("a positive double value of \(someDouble)") |
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
// | |
// NSFileHandle+Z.swift | |
// ZKit | |
// | |
// Created by Kaz Yoshikawa on 2/18/16. | |
// | |
// | |
import Foundation |
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
// | |
// String+Color.swift | |
// ZKit | |
// | |
// Created by Kaz Yoshikawa on 3/24/16. | |
// Copyright © 2016 Electricwoods LLC Inc. The MIT License. | |
// | |
import Foundation | |
import UIKit |
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
protocol Themeable { | |
var viewController: UIViewController { get } | |
} | |
extension Themeable where Self: UIViewController { | |
var viewController: UIViewController { return self } | |
} | |
class ThemeableViewController: UIViewController, Themeable {} | |
let themeable: Themeable = ThemeableViewController() |
OlderNewer