public void mouseClicked(MouseEvent e) {
		Point clickPoint = e.getPoint();
		if(barrierFlag) {
			if(getBarrierState(clickPoint.x,clickPoint.y)){
				GridBoard.this.setBarrierPosition(clickPoint.x,clickPoint.y,false);
			} else {
		    		GridBoard.this.setBarrierPosition(clickPoint.x,clickPoint.y,true);
			}
		} else if(goalFlag) {
			if(getPosition(clickPoint.x,clickPoint.y) == goalPosition){
				goalPosition = -1;
				repaint();
			} else {
		    		GridBoard.this.setGoalPosition(clickPoint.x,clickPoint.y);
			}
		} else if(startFlag){
			if(getPosition(clickPoint.x,clickPoint.y) == startPosition){
		    		startPosition = -1;
				repaint();
			} else {
				GridBoard.this.setStartPosition(clickPoint.x,clickPoint.y);
			}
		}
	}