Exemplo n.º 1
0
            public static Position Create(Fen fen)
            {
                ulong[] maps = new ulong[14];
                int     i    = 0;

                fen.ForEachPosition()
                .Where(c => !'/'.Equals(c))
                .Select(c => new { index = i += int.TryParse(c.ToString(), out int result) ? result : 1, piece = c })
Exemplo n.º 2
0
 public static Error FenError(Fen fen)
 => new FenError(fen);
Exemplo n.º 3
0
 public FenError(Fen fen)
 {
     Fen = fen;
 }
Exemplo n.º 4
0
 public static Option <Fen> CreateFen(this string fenString)
 => Fen.Of(fenString);
Exemplo n.º 5
0
 public static Either <string, Option <Fen> > CreateFen(this Either <string, string> fenString)
 => fenString.Map(f => Fen.Of(f));