feat: PingPongGame 일부 필드 namedtuple로 변경 #456
Open
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.
✅ 풀_리퀘스트 체크리스트
🔄 변경 사항
무엇을 합니다!
PingPongMap
클래스를namedtuple
로 변경Player
클래스를namedtuple
로 변경Bar
클래스 대신namedtuple
로 변경set...
함수 제거bounce()
시, 방향이-1 <= direction <= 1
인지 확인whether_score_a_goal
이[True, True]
일 때와[False, False]
일 때 추가📎 변경한 이유
namedtuple
로 관리하려 함closes: #454
👨🏻💻 테스트 체크리스트
📌 변경 및 주의 사항
GameConsumer.py
에서PingPongMap
만 클래스로 초기화하는 것이 아닌namedtuple
로 초기화하게 했는데, 혹시라도 외에 변경해야하는데 제가 놓친 부분이 있다면 말씀해주세요. 일단 컴파일 되는 것도 확인했습니다.