判斷圖片是否與空?qǐng)D片相鄰,為什么我點(diǎn)擊后都顯示false,代碼是對(duì)著老師敲的
2016-12-04
if (x == null_x && Math.abs(y - null_y) == 1) {
return true;
} else if (y == null_y && Math.abs(x - null_x) == 1) {
return true;
}
用絕對(duì)值的方法感覺更方便
return true;
} else if (y == null_y && Math.abs(x - null_x) == 1) {
return true;
}
用絕對(duì)值的方法感覺更方便
2016-10-05