func (player_ *Player) findShunZi() {
var begin int
var xgg int
for i := 0; i < len(player_.HoldCard); i++ {
if player_.HoldCard[i] > 0 && begin == 0 {
begin = i
} else if player_.HoldCard[i] == 0 && i != 12 {
if (i - begin) > 5 {
xgg = 0
break
}
}
}
}
编译的是总是 提示 “ xgg declared and not used”
感觉应该是编辑器会对if 进行检查,for没有,所以导致xgg not declared, 但是begin仍然可用,你可以在for里加上 ```_ = xgg```
#4
更多评论