Esempio n. 1
0
    private void HandleExplosionWithDirection(GridElement neighbor, int inputRefundValue)
    {
        bool eitherIsWhite = white || neighbor.white;
        int newRefundValue = inputRefundValue;

        if(!neighbor.readyToExplode){
            if((eitherIsWhite || ColorMatches (neighbor) || DirectionMatchesNeighbor(explosionDirection, neighbor)) || (newRefundValue >= 6 && neighbor.Disabled ())){
                if(colorIndex != neighbor.colorIndex){
                    newRefundValue += 1;
                }
                neighbor.SetExplode(explosionDirection, newRefundValue);
            }

        }
    }