private void checkIfJumpAvailableAndAddToListOfLegalMoves( int i_FromRow, int i_FromCol, int i_DirectionOfPlayer, eColumnMoveType i_ColumnMove) { if (r_Board.IsCellExist(i_FromRow + i_DirectionOfPlayer, i_FromCol + (int)i_ColumnMove) && m_LastPlayer.IsItAPlayerSymbole(r_Board.Board[i_FromRow + i_DirectionOfPlayer, i_FromCol + (int)i_ColumnMove].Value) && r_Board.IsCellExistAndAvailable(i_FromRow + (2 * i_DirectionOfPlayer), i_FromCol + (2 * (int)i_ColumnMove))) { updateListOfLegalMoves( i_FromRow, i_FromCol, i_FromRow + (2 * i_DirectionOfPlayer), i_FromCol + (2 * (int)i_ColumnMove), eMoveType.Jump); } }
private void checkIfMoveAvailableAndAddToListOfLegalMoves( int i_FromRow, int i_FromCol, int i_DirectionOfPlayer, eColumnMoveType i_ColumnMove) { if (r_LegalJumpMoves.Count == 0) { if (r_Board.IsCellExistAndAvailable(i_FromRow + i_DirectionOfPlayer, i_FromCol + (int)i_ColumnMove)) { updateListOfLegalMoves( i_FromRow, i_FromCol, i_FromRow + i_DirectionOfPlayer, i_FromCol + (int)i_ColumnMove, eMoveType.Regular); } } }