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

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

时间:2014-11-14 11:08来源:网络整理 作者:网络 点击:
分享到:
public void estimateEven(int placeX, int placeY, JButton bz) { if (pressInformation == false) { x = placeX; y = placeY; secondMsg = grid[x][y]; secondButton = bz; pressInformation = true; } else { x0

        public void estimateEven(int placeX, int placeY, JButton bz) {
                if (pressInformation == false) {
                        x = placeX;
                        y = placeY;
                        secondMsg = grid[x][y];
                        secondButton = bz;
                        pressInformation = true;
                } else {
                        x0 = x;
                        y0 = y;
                        fristMsg = secondMsg;
                        firstButton = secondButton;
                        x = placeX;
                        y = placeY;
                        secondMsg = grid[x][y];
                        secondButton = bz;
                        if (fristMsg == secondMsg && secondButton != firstButton) {
                                xiao();
                        }
                }
        }

精彩图集

赞助商链接