Closed luooooob closed 5 years ago
Hi! Thanks for the interest to the package
missing := 14 - l
need := missing
if missing != 14 {
this.opened = missing / 3
need = missing % 3
}
if need > 0 {
free := summary.CopyFree(compact.AllTiles)
if free.CountBits() < need {
return common.NewBadRequestError("Not enought tiles")
}
rnd := getRand()
wall := free.Instances()
rnd.Shuffle(len(wall), func(i, j int) {
wall[i], wall[j] = wall[j], wall[i]
})
hand := tile.Instances(wall[:need]).Tiles()
sort.Sort(hand)
this.Hand = this.Hand.Append(hand)
}
thank you, it works! I did not notice that the calculate function can accept the option parameter when I look at the source code, I think it should be reminded on the README.
Thanks for the note. I will probably add some notes on that and add comments to the code
thank you for this go package. I have two problems with it.