public void mousePressed(MouseEvent e) {  
    Card selectedCard;
    int selectedCardRow;
    int selectedCardCol;
    
    
    if (noMoreTableCards || noMoreAvailableMoves) {
    	
    	return;
    }
    
    Point pressPt = e.getPoint();
    
    Point rowColOfSelectedCard = getRowColOfSelectedCard(pressPt);
    
    
    if (rowColOfSelectedCard != null) { //
      selectedCardRow = rowColOfSelectedCard.x;
      selectedCardCol = rowColOfSelectedCard.y;
      
      
      selectedCard = cards[selectedCardRow][selectedCardCol];
     
      
      
      if(!selectedCard.isActive()){
    	  
    	  return;
      }else{
    	  
    	  
    	checkCard(selectedCard, selectedCardRow, selectedCardCol ); 
    	
      
      }
      
    }
      
    if (cardStack.size() > 0 && packCardHasBeenPressed(pressPt)) {
     
    	dealNewRow();
       
      
    }
    
    if(userScore == 48){
    	
    	repaint();
    	JOptionPane.showMessageDialog(this, "Congrats you win!!");
    	reset();
    	
    	
    }
    
    repaint();
    }