Added debug prints

This commit is contained in:
Davide Oddone 2023-12-08 01:00:01 +01:00
parent 31cc223170
commit 0cdc898118

View File

@ -13,19 +13,19 @@ import (
) )
var mapSeeds = map[string]int{ var mapSeeds = map[string]int{
"A": 13, "A": 12,
"K": 12, "K": 11,
"Q": 11, "Q": 10,
"J": 10, "J": 9,
"T": 9, "T": 8,
"9": 8, "9": 7,
"8": 7, "8": 6,
"7": 6, "7": 5,
"6": 5, "6": 4,
"5": 4, "5": 3,
"4": 3, "4": 2,
"3": 2, "3": 1,
"2": 1, "2": 0,
} }
type Game struct { type Game struct {
@ -276,8 +276,12 @@ func main() {
// Iter every array // Iter every array
for i := range g.typeOfHand { for i := range g.typeOfHand {
for j := range g.typeOfHand[i] { for j := range g.typeOfHand[i] {
fmt.Printf("For the array %d, element %d, ", i, j)
index := g.indexOfHand[i][j] index := g.indexOfHand[i][j]
fmt.Printf("I gather index %d ", index)
rank += curRank * bet[index] rank += curRank * bet[index]
fmt.Printf("and finally I multiply %d and %d.\n", curRank, bet[index])
fmt.Scanln()
curRank++ curRank++
} }
} }