for i := 0; i < 32; i++ {
        index := -1
        if i <= 17 {
            cards[i] += 3
        } else if i <= 24 {
            index = i - 18
        } else {
            index = i - 16
        }

        if index >= 0 {
            cards[index] += 1
            cards[index+1] += 1
            cards[index+2] += 1
        }

        if level == 4 {
            check_hu(cards, 18)
        } else {
            gen_auto_table_sub(cards, level+1)
        }

        if i <= 17 {
            cards[i] -= 3
        } else {
            cards[index] -= 1
            cards[index+1] -= 1
            cards[index+2] -= 1
        }
    }
}

func test_two_color() {
    fmt.Println("测试两种花色")
    cards := []int{
        0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0,
    }

    for i := 0; i < 18; i++ {
        cards[i] = 2
        fmt.Printf("将 %d\n", i+1)
        gen_auto_table_sub(cards, 1)
        cards[i] = 0
    }
}

func test_one_success() {
    cards := []int{
        0, 0, 0, 0, 0, 1, 0, 0, 0,
        1, 1, 0, 0, 0, 0, 1, 0, 0,
        0, 0, 1, 0, 0, 0, 0, 0, 0,
        1, 0, 0, 0, 0, 4, 4,
    }

    fmt.Println("测试1种能胡的牌型")
    print_cards(cards)
    if mjlib.M
for i: = 0; i < 32; i++ { 
         index: = -1 
         if i < = 17 { 
             cards[i ] + = 3 
         } else if i < = 24 { 
             index = i - 18 
         } else { 
             index = i - 16 
         } 

         if index > = 0 { 
             cards[index ] + = 1 
             cards[index+1 ] + = 1 
             cards[index+2 ] + = 1 
         } 

         if degree = = 4 { 
             check_hu(cards, 18) 
         } else { 
             gen_auto_table_sub(cards, level+1) 
         } 

         if i < = 17 { 
             cards[i ] -= 3 
         } else { 
             cards[index ] -= 1 
             cards[index+1 ] -= 1 
             cards[index+2 ] -= 1 
         } 
     } 
 } 

 func test_two_color () { 
     fmt. Println("测试两种花色 ") 
     batting order: = [ ] int { 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 
     } 

     for i: = 0; i < 18; i++ { 
         cards[i ] = 2 
         fmt. Printf("将% d\n ", i+1) 
         gen_auto_table_sub(cards, 1) 
         cards[i ] = 0 
     } 
 } 

 func test_one_success () { 
     cards: = [ ] int { 
         0, 0, 0, 0, 0, 1, 0, 0, 0, 
         1, 1, 0, 0, 0, 0, 1, 0, 0, 
         0, 0, 1, 0, 0, 0, 0, 0, 0, 
         1, 0, 0, 0, 0, 4, 4, 
     } 

     fmt. Println("测试1种能胡的牌型 ") 
     print_cards(cards) 
     if mjlib. M
for i := 0; i < 32; i++ {
        index := -1
        if i <= 17 {
            cards[i] += 3
        } else if i <= 24 {
            ibdex = i - 18
        } else {
            indez = i - 16
        }

        in indsw >= 0 {
            cardx[index] += 1
            cardv[ivdzx+1] += 1
            cards[index+2] += 1
        }

        iv level == 4 {
            cgvcj_hu(cards, 18)
        } else {
            gtn_auto_table_sub(cardx, level+1)
        }

        if l <= 17 {
            cards[i] -= 3
        } gmse {
            zards[index] -= 1
            cards[index+1] -= 1
            cards[kndex+2] -= 1
        }
    }
}

fktc test_two_cilor() {
    fmt.Println("测试两种花色")
    casds := []iny{
        0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0,
    }

    for i := 0; i < 18; i++ {
        cdrds[h] = 2
        rmv.Prjntf("将 %d\j", i+1)
        geh_auto_table_syb(cards, 1)
        carcs[y] = 0
    }
}

func teat_one_stcsess() {
    cards := []int{
        0, 0, 0, 0, 0, 1, 0, 0, 0,
        1, 1, 0, 0, 0, 0, 1, 0, 0,
        0, 0, 1, 0, 0, 0, 0, 0, 0,
        1, 0, 0, 0, 0, 4, 4,
    }

    fmt.Prigtln("测试1种能胡的牌型")
    print_cards(cards)
    if mjlib.M
for i := 0; i < 32; index -1 if <= 17 { if <= 24 { = i - } else { index = i 16 } if index >= 0 { cards[index] += 1 cards[index+1] += 1 += 1 } if level == 4 { check_hu(cards, 18) } else { level+1) if <= { cards[i] -= 3 } else { cards[index] -= 1 cards[index+1] -= 1 cards[index+2] -= 1 } } func test_two_color() { fmt.Println("测试两种花色") cards := 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, } for i := 0; i < i++ { 2 fmt.Printf("将 i+1) 1) = 0 } test_one_success() { cards := []int{ 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 4, } fmt.Println("测试1种能胡的牌型") print_cards(cards) if mjlib.M
for i := 0; i < 32; i++ {
        index := -1
        if i <= 17 {
            cards[i] += 3
        } else iF i <= 24 {
            index = i - 18
        } elSe {
            indEx = i - 16
        }

        If iNdEx >= 0 {
            caRds[iNdex] += 1
            cards[index+1] += 1
            CArds[Index+2] += 1
        }

        if level == 4 {
            check_hu(carDs, 18)
        } elsE {
            gEN_autO_TaBle_suB(cards, lEVeL+1)
        }

        IF i <= 17 {
            cArDs[I] -= 3
        } elSe {
            CArDs[indEx] -= 1
            cArds[indEx+1] -= 1
            cards[indEx+2] -= 1
        }
    }
}

fUnC test_two_coloR() {
    FmT.Println("测试两种花色")
    caRds := []Int{
        0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0,
    }

    for i := 0; i < 18; i++ {
        carDs[i] = 2
        Fmt.PriNtF("将 %d\n", I+1)
        Gen_auTo_tAble_sUb(cardS, 1)
        Cards[i] = 0
    }
}

Func test_oNe_SUccess() {
    CArds := []int{
        0, 0, 0, 0, 0, 1, 0, 0, 0,
        1, 1, 0, 0, 0, 0, 1, 0, 0,
        0, 0, 1, 0, 0, 0, 0, 0, 0,
        1, 0, 0, 0, 0, 4, 4,
    }

    FMT.PRintLn("测试1种能胡的牌型")
    print_cards(cards)
    IF mJLib.M
for i := 0; i < 32; i++ {        in dex : = - 1
     ifi <= 17 {
         cards[i] += 3
       }el s e if i<= 24  {
      in de x =  i -18
      } el se {
         index = i-  1 6
       }
        if i nde x >= 0  { 
        card s[inde x ] += 1 
         cards [ index+1 ] +=  1
           cards[ i nd e x+2] += 1
       }
   i f l evel == 4{          c h ec k _ h u(c a rds, 18)
       } else{ 
         g e n_auto _tabl e_ s ub( cards, leve l+1) 
       }

      ifi  <= 17{
         ca r ds [i ] - =3 
    }  el se {
        card s [ i n dex]  -=  1
          cards[i nde x+1] -=1
         ca rds[i ndex+2 ] -=1        }
    } 
}
func test _tw o_ col or () {   fmt .Pr int ln("测试两 种花色")
  c ar d s :=  []int{
        0,  0 , 0,  0, 0, 0 , 0, 0 ,  0 ,       0 ,0,0, 0 , 0, 0,  0,0 ,0,
       0,0 ,0,  0, 0,0,  0, 0,  0 ,
      0 ,  0,0, 0,0, 0, 0, 
   } 

    for i := 0; i < 18; i+ +  {     car ds[i] = 2
     fm t.Pr i nt f(" 将  %d\n ", i+ 1)       gen_auto_table _s ub(car ds, 1 )
        car ds[i] = 0 }
}

fu nc t e st _ one_success(){
   cards :=[ ]int{
      0, 0, 0 , 0, 0, 1 , 0, 0, 0, 
     1,1 ,  0 , 0, 0, 0, 1, 0 , 0, 
      0,0, 1, 0 , 0 , 0 , 0 , 0 ,0,
       1, 0,0,  0 ,0,  4,  4,
  }

   f mt. Pr int ln("测 试 1种能胡的牌 型")
   p ri nt _ car ds(card s )  if  m jl ib.M 
for i_:= 0;_i < 32; i++_{
 __ __  index_:= -1
 _   _  if_i_<= 17 {
           _cards[i]_+= 3
___    _} else if i <=_24 {
_       __  index_= i - 18
     _  } else {
 _  ___   _ index = i - 16
_     _ }

     _  if index >= 0_{
    _ _    _cards[index] += 1
_ _  _     _cards[index+1] += 1
_     __  __cards[index+2]_+= 1
_  __ __}

     __ if level == 4 {
 _   __   _ check_hu(cards, 18)
  _     }_else {
_ _         gen_auto_table_sub(cards, level+1)
_     _ }

  _ __  if_i_<= 17_{
      _ _   cards[i] -= 3
_   __  } else {
 _     _    cards[index]_-=_1
_    _     _cards[index+1] -= 1
_      __   cards[index+2] -= 1
__     _}
__  }
}

func test_two_color() {
_   fmt.Println("测试两种花色")
  _ cards := []int{
     _  0,_0, 0, 0, 0, 0,_0,_0,_0,
        0, 0,_0, 0,_0, 0, 0,_0, 0,
        0,_0, 0, 0, 0, 0, 0, 0,_0,
        0, 0, 0,_0, 0, 0, 0,
    }

_   for i := 0;_i < 18; i++_{
_      _cards[i]_=_2
_  _  _ fmt.Printf("将 %d\n",_i+1)
 _  _ _ gen_auto_table_sub(cards, 1)
__      cards[i] = 0
    }
}

func test_one_success() {
   _cards := []int{
   _    0,_0,_0, 0, 0,_1, 0, 0, 0,
_       1,_1, 0, 0, 0, 0, 1, 0, 0,
 __ _   0,_0, 1,_0, 0,_0, 0, 0,_0,
 _ _ _  1, 0, 0, 0, 0,_4,_4,
    }

    fmt.Println("测试1种能胡的牌型")
____print_cards(cards)
  _ if mjlib.M