Beispiel #1
0
        public static FEN Parse(string fenString)
        {
            var fen = new FEN();

            string[] config = fenString.Split(' ');
            fen.Pieces = new ReadOnlyCollection<PiecePlacement>(GetPieces(config[0]));
            fen.Turn = GetTurn(config[1]);
            fen.SetCastleAvailability(config[2]);
            return fen;
        }
Beispiel #2
0
 internal void SetPlacement(Board board, FEN.PiecePlacement piecePlacement)
 {
     this.Player = piecePlacement.Player;
     this.Square = piecePlacement.Square;
     this.Board = board;
 }