public void clicked(){
        Color bgColor = this.getBackground();
        Color pTurn = flag.getTurn();
        int typeSelected = flag.getTypeSelected();
        if( typeSelected == 0 ){
            if( this.getType()==0 || this.getType()==4 )
                JOptionPane.showMessageDialog( frame, "Cannot remove Type " + this.getType() + " cells!", "Error", JOptionPane.PLAIN_MESSAGE);
            else
                new Antivirus( buttonArray, this, this.getType(), flag ).cure();
        } else if( bgColor == Color.BLACK ){
            new InfectionSpreader( buttonArray, this, typeSelected, flag ).getInfection();
        } else if( bgColor == pTurn ){
            if( typeSelected >= this.getType() )
                new InfectionSpreader(buttonArray, this, typeSelected, flag ).getInfection();
            else
              JOptionPane.showMessageDialog( frame, "To upgrade your own cell you must select a cell type equal to or higher than it!", "Error", JOptionPane.PLAIN_MESSAGE);
        } else {
            if( typeSelected > this.getType() )
                new InfectionSpreader(buttonArray, this, flag.getTypeSelected(), flag ).getInfection();
            else 
              JOptionPane.showMessageDialog(frame, "To take over enemy cell you must select a cell type higher than it!", "Error", JOptionPane.PLAIN_MESSAGE);
        }
    }