Skip to content · ⁨본문 바로가기⁩

Tic-tac-toe winner · ⁨ tic-tac-toe 승자 확인⁩

English

Tic-tac-toe winner

Decide a game of noughts and crosses from the board.

There are eight lines to check: three rows, three columns and two diagonals. board[r][c] is the square in row r and column c, so a column is board[0][c] + board[1][c] + board[2][c]. Collect all eight lines as three-letter strings, then look for "XXX" or "OOO".

한국어

tic-tac-toe 승자

보드를 통해 크로스나이트 게임을 결정합니다.

확인해야 할 8개의 선이 있습니다: 3개의 행, 3개의 열, 2개의 대각선. board[r][c]은 행 r과 열 c의 사각형이므로, 한 열은 board[0][c] + board[1][c] + board[2][c]입니다. 8개의 선을 모두 3글자 문자열로 수집한 후, "XXX" 또는 "OOO"을 검색합니다.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP