Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
🀄️
Search
giginet
PRO
September 02, 2018
Technology
2.1k
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
🀄️
iOSDC 2018 LT
giginet
PRO
September 02, 2018
More Decks by giginet
See All by giginet
🀄️ on swiftc
giginet
PRO
0
620
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
510
Claude Codeログ基盤の構築
giginet
PRO
7
4.8k
Inside of Swift Export
giginet
PRO
1
3.6k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
3k
SwiftでMCPサーバーを作ろう!
giginet
PRO
3
500
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.7k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
8.7k
5分でわかるExplicitly Built Modules
giginet
PRO
2
1.9k
Other Decks in Technology
See All in Technology
eBPF 簡介 2026 版
shunghsiyu
0
170
なぜ東京にいる私が、新潟の技術コミュニティを運営するのか by 八雲慎之助
yakumo
0
220
[General] 개발자로 해외 기업에서 일하기
skydoves
1
290
攻撃 3 時間 vs 復旧 10 時間。アクセスキー流出の非対称性を体感するために CTF を作った話
kazzpapa3
1
140
Patterns in AI Driven Software Development
akosma
PRO
0
470
AIエージェント統制はAPIから——押さえるべき5つの要素
nagix
0
120
増え続けるプロダクトの品質をどう担保するか。ProductSpecとTypeScriptによる取り組み
joere
3
360
スマートロックを支えるFlutter × ネイティブ連携の実践 / Flutter and Native Integration in Practice: Powering Smart Locks
bitkey
PRO
0
150
仕様駆動開発の、その先へ。決める力と確かめる仕組み
inariku
1
170
Building Audio Plugin Ecosystem for Android in 2026
atsushieno
2
130
クラウドエージェントの先駆け Devin。今も最先端を走る、他との違い
kinopeee
2
560
企画からFlutter実装まで、1つの機能を一貫して開発したプロセスと成果物
khiroyuki1003
0
140
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
300
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
450
Testing 201, or: Great Expectations
jmmastey
46
8.4k
The Invisible Side of Design
smashingmag
301
52k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
500
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
360
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
520
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
How GitHub (no longer) Works
holman
316
150k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Transcript
@giginet
giginet/Peafowl
None
extension Tile: CustomPlaygroundDisplayConvertible { public var playgroundDescription: Any { //
ṛͷը૾ΛFramework͔ΒऔΓग़ͯ͠ੜ let bundle = Bundle(for: BundleIndicator.self) let path = bundle.path(forResource: String(describing: index), ofType: "png")! return NSImage(contentsOfFile: path)! } } 1MBZHSPVOE্ʹҙͷΛඳըͰ͖Δ 'SBNFXPSLͷը૾औ͖ͬͯͯฦ͢
None
extension Array: CustomPlaygroundDisplayConvertible where Element == Tile { public var
playgroundDescription: Any { return createTilesImage(of: self) as Any } } /4(SBQIJD$POUFYUͰखͷը૾Λಈతʹੜʢུʣ $POEJUJPOBM$POGPSNBODFͰ<5JMF>ʹ $VTUPN1MBZHSPVOE%JTQMBZ$POWFSUJCMFΛ࣮
None
None
಄ ໘ࢠ ໘ࢠ ໘ࢠ ໘ࢠ ྃܗ ॱࢠʢ࿈ଓͨ͠ṛʣ ࠁࢠʢಉ͡ṛʣ
ελοΫ
಄Λ164)
໘ࢠΛ164)
࡞Εͳ͘ͳͬͨΒ
101ͯ͠
࣍ͷΛ164)
None
ࣣରࢠܗ ࠃ࢜ແܗ ରࢠ ରࢠ
/// ௨ৗྃܗ public typealias MeldedForm = (PairToken, MeldToken, MeldToken, MeldToken,
MeldToken) /// ࣣରࢠܥ public typealias SevenPairsForm = (PairToken, PairToken, PairToken, PairToken, PairToken, PairToken, PairToken) /// ࠃ࢜ແܥ public typealias ThirteenOrphansForm = (PairToken, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile, Tile) public enum WinningForm { case melded(MeldedForm) case sevenPairs(SevenPairsForm) case thirteenOrphans(ThirteenOrphansForm) } ରࢠ ໘ࢠ ྃܗ ରࢠ ରࢠ
func detectForms(of: tiles: [Tile]) -> [WinningForm]? ṛ͔Β ྃܗΛ୳ࡧ
/// public protocol YakuProtocol: Hashable, CustomStringConvertible { var name:
String { get } /// var concealedFan: Int { get } /// ͍ᷰԼ͕Γ var openedFan: Int? { get } var isYakuman: Bool { get } static func make(with tiles: [Tile], form: WinningForm, picked: Tile, context: GameContext) -> Self? } खṛ ྃܗ ྃṛ ήʔϜঢ়ଶ Λද͢QSPUPDPM
public struct அϠΦ: YakuProtocol { public let openedFan: Int? =
1 public let concealedFan: Int = 1 public let name = "அϠΦ" public static func make(with tiles: [Tile], ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ form: WinningForm, ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ picked: Tile, ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ context: GameContext) -> அϠΦ? { if tiles.allSatisfy({ !$0.isYaochu }) { return அϠΦ() } return nil } } શͯϠΦṛͰͳ͍͜ͱΛνΣοΫ 4XJGU͔Β ͍۬அೝΊͯΔ
None
ଘࡏܕͰͳ͍
let yaku: Set<AnyYaku> = [ AnyYaku(அϠΦ()), AnyYaku(ฏ()), AnyYaku(લਗ਼ࣗ()), ] ܕফڈ
ҎԼলུ #PYͰϥοϓͯ͠ܕΛফ͢
಄λϓϧ ໘ࢠλϓϧ
ήʔϜঢ়ଶ ූᠹ
ߴ๏ ෳͷղऍ͕Ͱ͖Δͱ͖ʹ࠷ߴͷ݁ՌΛ࠾༻͢Δ͜ͱ
ࣣରࢠɺஅϠΦූᠹ ෳͷྃܗͱͯ͠ղऍͰ͖Δέʔε ࣣରࢠܗ
ೋഌޱɺஅϠΦූᠹຬ؏ ࣣରࢠɺஅϠΦූᠹ ྃṛ ෳͷྃܗͱͯ͠ղऍͰ͖Δέʔε ࣣରࢠܗ ௨ৗྃܗ
ࣣରࢠܗ ௨ৗܗ ߴ͍ํΛ࠾༻ ղऍ͕ͭ
ྃͷղऍͰූ͕มΘΔέʔε ྃṛ ྃṛʢ྆໘ͪʣ ྃṛʢቕுͪʣ πϞɺූᠹ πϞɺූᠹ
ղऍ͕ͭ ಉ͡ ූ ූ
None
"WBJMBCMFPOXBUDI04
giginet/Peafowl