龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > JAVA开发 >

java基于swing实现的连连看代码(6)

时间:2014-11-14 11:08来源:网络整理 作者:网络 点击:
分享到:
public void rowPassOne() { if (x0 i) { for (j = x0 - 1; j = i; j--) { if (grid[j][y0] != 0) { k = 0; break; } else { k = 2; } } } if (x0 i) { for (j = x0 + 1; j = i; j++) { if (grid[j][y0] != 0) { k =

        public void rowPassOne() {
                if (x0 > i) {
                        for (j = x0 - 1; j >= i; j--) {
                                if (grid[j][y0] != 0) {
                                        k = 0;
                                        break;
                                } else {
                                        k = 2;
                                }
                        }
                }
                if (x0 < i) {
                        for (j = x0 + 1; j <= i; j++) {
                                if (grid[j][y0] != 0) {
                                        k = 0;
                                        break;
                                } else {
                                        k = 2;
                                }
                        }
                }
        }

精彩图集

赞助商链接