void FindAllMoves() { allPossibleMoves = new List <FigureMoving>(); foreach (FigureOnSquare fs in board.YieldFigures()) { foreach (Square to in Square.YieldSquares()) { FigureMoving fm = new FigureMoving(to, fs); if (moves.CanMove(fm)) { if (!board.IsCheckAfterMove(fm)) { allPossibleMoves.Add(fm); } } } } }