still doesn't work, but is moving in the right direction

This commit is contained in:
Jeffrey Paul 2019-04-03 14:54:42 -07:00
parent daa52b9f3c
commit 5289841027
2 changed files with 25 additions and 21 deletions

View File

@ -189,4 +189,3 @@ func proto() {
cmty := myDeck.Deal(5)
fmt.Printf("community: %s\n", cmty)
}

View File

@ -22,7 +22,7 @@ const (
SET HandScoreType = 3
STRAIGHT HandScoreType = 4
FLUSH HandScoreType = 5
BOAT HandScoreType = 6
FULL_HOUSE HandScoreType = 6
QUADS HandScoreType = 7
STRAIGHT_FLUSH HandScoreType = 8
)
@ -60,6 +60,11 @@ func (self *HEPokerHand) ScoreHand() *HandScore {
}
func scoreHEPokerHand(input Cards) (hand HEPokerHand) {
func scoreHEPokerHand(input Cards) *HEPokerHand {
// this takes a list of pointers to 7 cards, permutes them into every
// possible five-card hand, by removing each in turn and recursing to
// itself, and then returns the best one as an *HEPokerHand
// out of all possible five-card permutations.
return 1
}