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
2k
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
580
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
450
Claude Codeログ基盤の構築
giginet
PRO
7
4.6k
Inside of Swift Export
giginet
PRO
1
3.5k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
2.9k
SwiftでMCPサーバーを作ろう!
giginet
PRO
3
480
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.7k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
8.5k
5分でわかるExplicitly Built Modules
giginet
PRO
2
1.9k
Other Decks in Technology
See All in Technology
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
12k
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
400
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
2
1.9k
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
180
Minecraft JavaのMODをSwiftで作る
1mash0
0
160
10分で知る最近のOmarchy
komagata
0
310
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
1
510
Podは生きているのにGoだけが落ちる:GOGCとGOMEMLIMITで追うInvisible OOM Killの謎
tkc66buzz
1
720
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
350
人間はどの意思決定を手放せるのか
kawasima
14
6.5k
家のリアーキテクト・リファクタリング
suguruooki
0
150
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
300
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
Designing Experiences People Love
moore
143
24k
Chasing Engaging Ingredients in Design
codingconduct
0
310
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Why Our Code Smells
bkeepers
PRO
340
58k
Facilitating Awesome Meetings
lara
57
7.1k
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