Exemple #1
0
 /// <summary>
 /// 指し手を文字列化します。
 /// </summary>
 public override string ToString()
 {
     if (SpecialMoveType != SpecialMoveType.None)
     {
         return(string.Format(
                    "{0}{1}",
                    Stringizer.ToString(BWType),
                    EnumEx.GetLabel(SpecialMoveType)));
     }
     else if (ActionType == ActionType.Drop)
     {
         return(string.Format(
                    "{0}{1}{2}{3}打",
                    Stringizer.ToString(BWType),
                    IntConverter.Convert(NumberType.Big, DstSquare.File),
                    IntConverter.Convert(NumberType.Kanji, DstSquare.Rank),
                    Stringizer.ToString(DropPieceType)));
     }
     else if (HasSameSquareAsPrev)
     {
         return(string.Format(
                    "{0}同 {1}{2}({3}{4})",
                    Stringizer.ToString(BWType),
                    MovePiece,
                    Stringizer.ToString(ActionType),
                    SrcSquare.File,
                    SrcSquare.Rank));
     }
     else
     {
         return(string.Format(
                    "{0}{1}{2}{3}{4}({5}{6})",
                    Stringizer.ToString(BWType),
                    IntConverter.Convert(NumberType.Big, DstSquare.File),
                    IntConverter.Convert(NumberType.Kanji, DstSquare.Rank),
                    MovePiece,
                    Stringizer.ToString(ActionType),
                    SrcSquare.File,
                    SrcSquare.Rank));
     }
 }
Exemple #2
0
 /// <summary>
 /// 駒を文字列化します。
 /// </summary>
 public override string ToString()
 {
     return(Stringizer.ToString(BWType) + Stringizer.ToString(Piece));
 }
Exemple #3
0
 /// <summary>
 /// 文字列化します。
 /// </summary>
 public override string ToString()
 {
     return(Stringizer.ToString(this));
 }