Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] #106-Default Player 설정 (쇼케이스용) #108

Merged
merged 8 commits into from
Dec 1, 2024

Conversation

HyunJaeyeon
Copy link
Member

@HyunJaeyeon HyunJaeyeon commented Nov 30, 2024

👀 연관 이슈

resolved: #106

🛏️ 요약

이번 PR에서 작업한 내용을 간략히 설명해주세요

  • 쇼케이스용으로 default player을 진행자, 참가자로 변경했습니다

🎁 작업 내용

1. isHost 속성 추가

  • 진행자를 구분할 수 있는 속성인 isHost를 추가하여, 첫번째 플레이어를 true로 설정해줬습니다.
struct Player: Identifiable {
//...
    var isHost = false
}

@Observable class GameData {
//...
    var players: [Player] = [Player(turn: 1, isHost: true), Player(turn: 2)] // 첫번째 플레이어는 isHost -> true
}

2. 뷰와 뷰모델에 반영

  • 플레이스 홀더 변경
  • 뷰모델 내부의 초기화, 추가, 저장 함수 수정

📱 작업 스크린샷 (선택)

ScreenRecording_12-01-2024.04-30-53_1.MP4

🎾 공유사항 (선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

  • base 브랜치를 showcase로 설정하였습니다.

@HyunJaeyeon HyunJaeyeon added the Feature 새로운 기능 추가 label Nov 30, 2024
@HyunJaeyeon HyunJaeyeon self-assigned this Nov 30, 2024
@HyunJaeyeon HyunJaeyeon linked an issue Nov 30, 2024 that may be closed by this pull request
3 tasks
@HyunJaeyeon HyunJaeyeon changed the title [Feat] #106-showcase default player [Feat] #106-Default Player 설정 (쇼케이스용) Nov 30, 2024
@HyunJaeyeon HyunJaeyeon reopened this Nov 30, 2024
@HyunJaeyeon HyunJaeyeon changed the base branch from develop to showcase November 30, 2024 19:37
@HyunJaeyeon HyunJaeyeon requested a review from mosiccan December 1, 2024 12:45
Comment on lines +47 to +51
if player.isHost {
tempPlayers[index].nickname = "진행자"
} else {
tempPlayers[index].nickname = "도전자\(player.turn - 1)"
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인요잉

@HyunJaeyeon HyunJaeyeon merged commit 6ee788c into showcase Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature 새로운 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] Default Player 설정 (쇼케이스용)
2 participants