private void panelMouseReleased(MouseEvent e){
		if(cc.getState()==1){
			JPanel source = (JPanel)e.getSource();
			Point p = SwingUtilities.convertPoint(source, e.getPoint(), source.getParent());
			Component jc = source.getParent().getComponentAt(p);
			JPanel target = null;
			if(jc instanceof JPanel)
				target = (JPanel)jc;
			if(target == null || source != target )
				return;
			else {
				if(cc.getPiece()==0)
				{
					target.setBackground(Color.green);
					cc.setPiece(getPieceNum(target));
				}
				else
				{
					int pieceNum = getPieceNum(target);
					if(cc.getPiece()== pieceNum)
					{
						target.setBackground(this.getBackground());
						cc.setPiece(0);
					}
					else
					{
						getPiecePanel(cc.getPiece()).setBackground(this.getBackground());
						target.setBackground(Color.GREEN);
						cc.setPiece(pieceNum);
					}
				}
			}
		}
	}