-
Methods in miniGame.minesweeper with parameters of type MyButton
| Modifier and Type |
Method |
Description |
void |
MineSweeper.addButtonImage(MyButton myButton) |
버튼에 이미지 붙이기
switch문을 사용하여 게임 난이도별로 나누고(난이도마다 버튼의 크기가 달라 크기 지정하기 위함),
게임 버튼에 이미지를 추가한다.
|
void |
MineSweeper.clickTheBOOM(MyButton[][] myButton,
int row,
int col) |
지뢰를 눌렀을 때 모든 판이 오픈되도록 설정한다
|
void |
MineSweeper.clickTheButtonColor(MyButton[][] myButton,
int row,
int col) |
숫자별 색상 설정하는 메소드 오버로드
true일때는 굳이 변수로 설정하지 않아도 되도록
|
void |
MineSweeper.clickTheButtonColor(MyButton[][] myButton,
int row,
int col,
boolean isGameover) |
숫자별 색상 설정하기
지뢰를 유추하는 범위가 3x3이므로 최대 지뢰를 표시하는 8까지 나올 수 있다.
|
void |
MineSweeper.clickToZero(MyButton[][] myButton,
int row,
int col) |
눌렀는데 0번이면 주변 3X3 부분 자동으로 열리게 만들기
|
void |
MineSweeper.findAllMine(MyButton[][] myButton) |
지뢰를 유추하여
지뢰를 제외한 모든 판에 클릭해서 숫자가 뜨게 한 후
빈화면에 깃발까지 다 꽂혀있을때 최종적으로 게임이 끝나도록 설정한다
|
void |
MineSweeper.setCountFlag(MyButton[][] myButton) |
게임 사용자가 플래그로 표시한 총 갯수 세기
|