private void UpdateInvalidFieldBoundaries(GridPoint center) { BimaruValue centerValue = GetFieldValueNoCheck(center); foreach (Direction direction in Directions.GetAllDirections()) { BimaruValue neighbourValue = this[center.GetNextPoint(direction)]; FieldBoundary boundary = center.GetBoundary(direction); if (centerValue.IsCompatibleWith(direction, neighbourValue)) { invalidFieldBoundaries.Remove(boundary); } else { invalidFieldBoundaries.Add(boundary); } } }