-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Algorithm] 혼자서 하는 틱택토 #119
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
💬 문제
혼자서 하는 틱택토
💬 Idea
이 경우를 위해서 3x3의 보드를 0, 1, 2, 3, 4, 5, 6, 7, 8의 정수값을 가지는 숫자판으로 가정한다.
가로
: [0,1,2], [3,4,5], [6,7,8]대각선
: [0,4,8], [2,4,6]세로
: [0,3,6], [1,4,7], [2,5,8]O, X가 나올때마다 각각의 좌표를 정수로 변환하여 oBoard, xBoard에 append해주었다.
이후 oBoard, xBoard의 수가 각각 3을 넘어갈 경우 미리 계산해둔 bingo의 가능성이 저장되어있는 bingoArr를 차례로 돌면서 bingo가 되었을 때 게임이 종료됨을 알리는 isOXEnd 변수의 값을 true로 바꾸고 반복문을 탈출한다.
💬 풀이
The text was updated successfully, but these errors were encountered: