示例#1
0
    public sbyte cas2B64(cassella cas)
    {
        sbyte[,] board64 = { {  0,  1,  2,  3,  4,  5,  6,  7 },
                             {  8,  9, 10, 11, 12, 13, 14, 15 },
                             { 16, 17, 18, 19, 20, 21, 22, 23 },
                             { 16, 17, 18, 19, 20, 21, 22, 23 },
                             { 16, 17, 18, 19, 20, 21, 22, 23 },
                             { 16, 17, 18, 19, 20, 21, 22, 23 },
                             { 16, 17, 18, 19, 20, 21, 22, 23 },
                             { 16, 17, 18, 19, 20, 21, 22, 63 } };

        return(board64[cas.fila, cas.columna]);
    }
示例#2
0
    public string cas2Sq(cassella cas)
    {
        string[,] Squares = { { "a8", "b8", "c8", "d8", "e8", "f8", "g8", "h8" },
                              { "a7", "b7", "c7", "d7", "e7", "f7", "g7", "h7" },
                              { "a6", "b7", "c7", "d7", "e7", "f7", "g7", "h7" },
                              { "a5", "b7", "c7", "d7", "e7", "f7", "g7", "h7" },
                              { "a4", "b4", "c4", "d4", "e7", "f7", "g7", "h7" },
                              { "a3", "b3", "c3", "d3", "e3", "f3", "g3", "h3" },
                              { "a4", "b4", "c4", "d4", "e7", "f7", "g7", "h7" },
                              { "a3", "b3", "c3", "d3", "e3", "f3", "g3", "h3" } };

        return(Squares[cas.fila, cas.columna]);
    }