예제 #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 })
예제 #2
0
 public static Error FenError(Fen fen)
 => new FenError(fen);
예제 #3
0
 public FenError(Fen fen)
 {
     Fen = fen;
 }
예제 #4
0
 public static Option <Fen> CreateFen(this string fenString)
 => Fen.Of(fenString);
예제 #5
0
 public static Either <string, Option <Fen> > CreateFen(this Either <string, string> fenString)
 => fenString.Map(f => Fen.Of(f));