예제 #1
0
파일: King.cs 프로젝트: starrett67/Chess
        public King(bool isWhite, Board board)
        {
            ChessBoard = board;
            InPlay = true;
            Team = isWhite;

            if (isWhite && ChessBoard.GetKingIfInPlay(Team) == null)
            {
                Position = new Pair(0, 4);
            }
            else if (!isWhite && ChessBoard.GetKingIfInPlay(Team) == null)
            {
                Position = new Pair(7, 4);
            }
        }