diff --git a/54_poker_hands/main.go b/54_poker_hands/main.go index d3aed26..8cc2ba7 100644 --- a/54_poker_hands/main.go +++ b/54_poker_hands/main.go @@ -74,3 +74,13 @@ func (c card) suit() string { } type cards [5]card + +func (c cards) isSampleSuit() bool { + s := c[0].suit() + for _, card := range c { + if card.suit() != s { + return false + } + } + return true +}