public int otherStringsEndInTheSameColumn(Cell cell) { if (!isStringsEnd(cell)) return 0; int result = 0; int height = getHeight(); for (int y = 0; y < height; y++) { Cell cCell = new Cell(cell.x, y); if (!cCell.equals(cell) && isStringsEnd(cCell)) { result++; } } return result; }