'============================================================
Private Sub EvaluatePostFlopStrength(HoleCards As List, BoardCards As List) As ResumableSub
Dim AllCards As List
AllCards.Initialize
For Each c As Object In HoleCards
AllCards.Add(c)
Next
For Each c As Object In BoardCards
AllCards.Add(c)
Next
Wait For (cPokerEvaluator.EvaluateCards(AllCards)) Complete (EvalRes As Map)
Dim Category As Int = EvalRes.Get(cPokerEvaluator.cResult_Category)
' Also check board-only category so bot knows if it is just "playing the board"
Dim BoardCategory As Int = 0
If BoardCards.Size >= 3 Then
Wait For (cPokerEvaluator.EvaluateCards(BoardCards)) Complete (BoardRes As Map)
BoardCategory = BoardRes.Get(cPokerEvaluator.cResult_Category)
End If
Dim Strength As Int = 20
Select Category
Case cCAT_ROYAL_FLUSH, cCAT_STRAIGHT_FLUSH
Strength = 100
Case cCAT_FOUR_KIND
Strength = 98
Case cCAT_FULL_HOUSE
Strength = 94
Case cCAT_FLUSH
Strength = 88
Case cCAT_STRAIGHT
Strength = 84
Case cCAT_THREE_KIND
Strength = 78
Case cCAT_TWO_PAIR
Strength = 68
Case cCAT_ONE_PAIR
Strength = 52
Case cCAT_HIGH_CARD
Strength = 25
End Select
' If the community board itself already has the same pair/two-pair/trips,
' our hole cards aren't helping as much -> reduce confidence
If BoardCategory > 0 And Category = BoardCategory Then
Strength = Strength - 22
End If
Return Max(5, Min(100, Strength))
End Sub