Ejemplo n.º 1
0
 public IEnumerable <string> YieldValidMoves()
 {
     foreach (FigureOnSquare fs in board.YieldMyFiguresOnSquares())
     {
         foreach (Square to in Square.YieldBoardSquares())
         {
             foreach (Figure promotion in fs.figure.YieldPromotions(to))
             {
                 FigureMoving fm = new FigureMoving(fs, to, promotion);
                 if (moves.CanMove(fm))
                 {
                     if (!board.IsCheckAfter(fm))
                     {
                         yield return(fm.ToString());
                     }
                 }
             }
         }
     }
 }