コード例 #1
0
        public bool IsPawnValid(IChessPiece piece, int x, int y)
        {
            ChessTile chessTile = piece.getActualPosition();

            if (IsEmpty(x, y))
            {
                if (chessTile.Y != y)
                {
                    return(false);
                }
            }
            else
            {
                if (chessTile.Y == y)
                {
                    return(false);
                }
            }

            return(true);
        }