Find Where to Expand in Minesweeper (Java)
Implement a function that turns revealed cells into -2 given a location the user wants to click.For simplicity, only reveal cells that have 0 in them. If the user clicks on any other type of cell (for example, -1 / bomb or 1, 2, or 3), just ignore the click and return the original field. If a user clicks 0, reveal all other 0's that are connected to it.Example 1: Given field: [[0, 0, 0, 0, 0], [..
더보기
Assign Numbers in Minesweeper (Java)
Implement a function that assigns correct numbers in a field of Minesweeper, which is represented as a 2 dimensional array.Example: The size of the field is 3x4, and there are bombs at the positions [0, 0] (row index = 0, column index = 0) and [0, 1] (row index = 0, column index = 1).Then, the resulting field should be:[[-1, -1, 1, 0], [2, 2, 1, 0], [0, 0, 0, 0]] Your function should return the ..
더보기
단축키
내 블로그
내 블로그 - 관리자 홈 전환 |
Q
Q
|
새 글 쓰기 |
W
W
|
블로그 게시글
글 수정 (권한 있는 경우) |
E
E
|
댓글 영역으로 이동 |
C
C
|
모든 영역
이 페이지의 URL 복사 |
S
S
|
맨 위로 이동 |
T
T
|
티스토리 홈 이동 |
H
H
|
단축키 안내 |
Shift + /
⇧ + /
|
* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.