bittoy

第 5577 号会员 /

回复了 jikai507 创建的主题: 请问Golang中如何定义常量数组

var role_array [6][6]int = Role_role()
func Role_role() [6][6]int {
    return [6][6]int{
        {1, 1, 1, 1, 1, 1},
        {0, 20, 0, 0, 0, 0},
        {0, 0, 20, 0, 0, 0},
        {0, 10, 10, 20, 0, 0},
        {0, 10, 10, 10, 20, 0},
        {1, 5, 5, 5, 5, 20},
    }
}