Avatar
そうですね。↓みたいな。 init?(start: Coordinate, direction: Direction, distance: Distance) { guard let end = start + direction.interval(of: distance) else { return nil } self.start = start self.end = end self.direction = direction self.distance = distance }
3:00 AM
switch の二回の分岐が Direction.interval の一回にまとめられそうだし、