<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using CAESAR.Chess.Core;
using CAESAR.Chess.Helpers;
using CAESAR.Chess.Pieces;
using CAESAR.Chess.PlayArea;

namespace CAESAR.Chess.Positions
{
    public class Position : IPosition
    {
        private static readonly FenString StartingPositionFenString =
            "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
        private static readonly FenString EmptyPositionFenString =
            "8/8/8/8/8/8/8/8 w KQkq - 0 1";


        public Position(FenString fenString = null)
        {
            Board = new Board(this);
            fenString = fenString ?? StartingPositionFenString;
            SetPosition(fenString);
        }

        public static IPosition EmptyPosition => new Position(EmptyPositionFenString);

        public void ClearBoard()
        {
            foreach (var square in Board.Squares)
                square.Piece = null;
        }<commit_msg>Fixed Castling Rights in Empty Position<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using CAESAR.Chess.Core;
using CAESAR.Chess.Helpers;
using CAESAR.Chess.Pieces;
using CAESAR.Chess.PlayArea;

namespace CAESAR.Chess.Positions
{
    public class Position : IPosition
    {
        private static readonly FenString StartingPositionFenString =
            "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
        private static readonly FenString EmptyPositionFenString =
            "8/8/8/8/8/8/8/8 w - - 0 1";


        public Position(FenString fenString = null)
        {
            Board = new Board(this);
            fenString = fenString ?? StartingPositionFenString;
            SetPosition(fenString);
        }

        public static IPosition EmptyPosition => new Position(EmptyPositionFenString);

        public void ClearBoard()
        {
            foreach (var square in Board.Squares)
                square.Piece = null;
        }
{'fraction_non_alphanumeric': 0.08354430379746836, 'fraction_numerical': 0.01620253164556962, 'mean_word_length': 2.4010327022375213, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4109522', 'n_tokens_mistral': 621, 'n_tokens_neox': 596, 'n_words': 138}