public boolean isShipCollide(Point point,Ship s){
		int sLength = s.getLength();
		int rowStart, colStart, rowEnd, colEnd;
		
		Cell startCell = (Cell) this.getComponentAt(point);
		rowStart = startCell.getRow();
		colStart = startCell.getColumn();
		rowEnd = startCell.getRow();
		colEnd = startCell.getColumn();

		if(s.isHorizontal()){
			
			if(colStart > 10 - sLength) colStart = 10 - sLength; 			
			colEnd = colStart + sLength - 1;			
			if(colEnd > 10) colEnd = 10;
			
		}else{
			
			if(rowStart > 10 - sLength) rowStart = 10 - sLength; 
			rowEnd = rowStart + sLength - 1;
			if(rowEnd > 10)rowEnd = 10;

		}		
		
		for(int r=rowStart;r <= rowEnd;r++){
			for(int c=colStart;c <= colEnd;c++){
				if(flags[r][c][0] != 0 && flags[r][c][0] != s.getId()){
					//System.out.println("Collide");
					return true;
				}
			}
		}
		return false;
	}