mirror of
https://github.com/cubixle/codekata-golang.git
synced 2026-04-24 18:34:42 +01:00
update euler 54
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user