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.
겜블 스크린 제작
겜블이 끝나면 다시 겜블 선택화면으로 복귀
겜블 선택화면에서 ESC를 누르면 메인메뉴로 이동
GambleScreen이 호출 될 때 플레이어의 Currency를 불러옴
초기화 함수는 Ship, Bullet, Entity를 초기화
겜블 화면은 총 3개 겜블 선택화면, 파칭코, 가위바위보
이를 update(), draw()에서 case문으로 나눠서 사용.
Entity class에서 Input Parameter에 따라 다른 선언 추가
베팅금은 좌우로 10씩, 상하로 100씩 오르내리고
파칭코와 가위바위보 둘 중 하나의 겜블을 선택
파칭코는 계속해서 바뀌는 Entity를 공격해 맞출 시 Sprite가 확정되고 Entity는 3개가 있음
3개 모두 맞출 경우 베팅금의 3배, 특별한 한 경우는 7배
2개 맞출 경우 베팅금의 1.2배
가위바위보는 플레이어가 가위 바위 보 중에 하나를 고름
고르는 순간 계속해서 바뀌던 컴퓨터의 가위바위보가 멈추고 결과를 계산한다.
비기는 경우 잠깐 멈춘 뒤 다시 시작하고
이기면 랜덤으로 상금의 배율이 정해진다.
배율은 {1,1,1.2,1.5,1.5,2,2,3,5,7,} 중에 하나로 정해진다.
겜블이 끝났는지 확인 후 플레이어의 Currency를 업데이트한다.
겜블 도중에는 나갈 수 없고 겜블이 끝나면 ESC로 이번 겜블에서 나갈 수 있다.
함수와 변수의 사용처는 코드에 주석으로 넣어둠