Beispiel #1
0
    private bool CheckForPossibleInputs()
    {
        bool hasPossibleInput = false;

        for (int row = 0; row < elementsPositions.GetLength(1); row++)
        {
            for (int collum = 0; collum < elementsPositions.GetLength(0); collum++)
            {
                changedPotitions[collum, row] = false;
                if (elementsPositions[collum, row].GetElementClassType() == typeof(CashBoardElement))
                {
                    continue;
                }
                else if (elementsPositions[collum, row].GetElementClassType() == typeof(BombBoardElement) || elementsPositions[collum, row].GetElementClassType() == typeof(BellBoardElement))
                {
                    hasPossibleInput = true;
                }
                else if (BoardFunctions.IsPotentialInput(collum, row, elementsPositions, matchedElemPositions, ConstantValues.totalCollums, ConstantValues.totalRows) > 0)
                {
                    //AlexDebugger.GetInstance().AddMessage(BoardFunctions.GetTransformByIndex(elementsPositions[collum, row].GetTransformIndex()) + " is potential input", AlexDebugger.tags.Step5);
                    BoardFunctions.ToggleHighlightCell(collum, row, this, true);
                    hasPossibleInput = true;
                }
                else
                {
                    BoardFunctions.ToggleHighlightCell(collum, row, this, false);
                }
            }
        }
        return(hasPossibleInput);
    }