Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
먼저 과제를 제출기한보다 늦게 제출한 점 죄송합니다.
<느낀 점>
미션을 진행하면서 들여쓰기를 최대한 하지 않고 함수가 하나의 일만 잘 수행하도록 코드를 짜기 위해 설계하는 과정에서 시간을 많이 쓴 것 같습니다. 그래도 덕분에 함수명만 제대로 기능에 맞게 정해놓으면 어떤 역할을 하는 지 바로 알 수 있는 것 같아 이번 요구사항의 중요성을 여러모로 느끼게 되었습니다.
또한 리스트를 사용하다보니 stream api로 코드를 짜보았는데 확실히 collector를 사용하여 데이터를 변환하는 게 특히 사용하기 간편해서 좋았습니다.
<생각할 점>
자동차라는 객체를 생성하여 게임을 진행하게 되는데 현재는 Car라는 구체적인 개체 하나로 코드를 만들었지만, 자동차의 움직임에 대해 인터페이스를 걸어놓고 Car 클래스가 그 인터페이스를 구현하는 방식으로 갔으면 확장성 면에서 더 좋지 않았을까 하는 생각이 든다. 그렇다면 해당 인터페이스에는 move(), getLocation() 등의 메서드를 집어넣고 차종에 따라 메서드 오버라이딩을 하는 느낌으로 흘러갈 것 같고, 이렇게 하는 게 차의 종류에 따른 차이점을 주기 쉬울 것 같다는 생각이 든다.