Exemplo n.º 1
0
        public string ToString(moveStringStyle notationStyle)
        {
            StringBuilder toRet = new StringBuilder();

            foreach (move move in line)
            {
                if (move != null)
                    toRet.AppendLine(move.ToString(notationStyle));
            }
            toRet.AppendLine(_scorer.ToString());

            return toRet.ToString();
        }
Exemplo n.º 2
0
 public string ToString(moveStringStyle style)
 {
     switch (style)
     {
         case moveStringStyle.coord:
             return string.Format("[{0},{1}] -> [{2},{3}]", srcPos.x, srcPos.y, dstPos.x, dstPos.y);
         case moveStringStyle.chessNotation:
             return toChessNotation();
         default:
             throw new ArgumentOutOfRangeException("style");
     }
 }
Exemplo n.º 3
0
 public string ToString(moveStringStyle chessNotation)
 {
     switch (chessNotation)
     {
         case moveStringStyle.coord:
             return string.Format("[ {0} , {1} ]", x, y);
         case moveStringStyle.chessNotation:
             // Don't forget chess-style co-ords start at 1, not 0.
             return string.Format("{0}{1}", getBoardLetter(x), y + 1);
         default:
             throw new ArgumentOutOfRangeException("chessNotation");
     }
 }