Open
Conversation
기능, 프로그래밍 요구 사항 및 구현한 기능 목록 작성
오목 칸의 상태와 현재 차례를 알려주는 BoardState, User Enum 생성 BoardState는 흑돌이면 BLACK, 백돌이면 WHITE, 빈칸이면 EMPTY이다
매 성공적인 착수마다 차례를 나타내는 프로퍼티인 turn을 바꾸는 changeTurn() 구현
사용자가 선택한 칸이 빈칸인지 확인하는 isEmptySpace() 구현
선택한 위치에 차례에 맞는 돌을 두는 placeStone() 구현 실제 뷰에 그리는 부분은 placeStoneView()로 분리
착수 후 승리 여부를 판단하는 isWin() 구현. checkDirection으로 각 방향(수직, 수평)을 지정하고 countDirection으로 선택된 방향의 정,역을 방문(수평시 좌,우)
승리 조건 충족시 승자를 textView에 띄운후 재시작 버튼을 보여준다. 클릭 시 액티비티를 하나 더 실행한다
정상적인 작동 확인을 위한 테스트 생성. 테스트에서 mainActivity 인스턴스 생성 시도 하였으나 별도의 패키지 설치가 필요하여 메서드 및 프로퍼티를 복사하였음
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
경북대 Android 트랙 류지원 2차 미니과제 제출합니다!