build-lists: true footer: © Brian Hardy, 2017. @lyricsboy
Brian Hardy Atlanta iOS Developers
- 52-card deck
- 4 suits, Aces high
- Sample hand:
2H 3D 5S 9C KD
- Goal: Compare hands to determine a winner.
Reference: Coding Dojo
- Protocols
- Equatable
- Comparable
- Hashable
- Enumerations
- Associated Values
- Test
- Driven
- Design
- Red: Write a failing test
- Green: Make the test pass
- Refactor: Improve, DRY, etc.
[.autoscale: true]
- Model Card, Suit, Rank
- Model Poker Hand
- (5 cards)
- Identify Known Hands
- (pair, full house, flush)
- Compare Hands
- hand ranking
- card ranking