()
| 175 | } |
| 176 | /* 刷新移除row行方块后的游戏主面板区域*/ |
| 177 | public void reflesh() { |
| 178 | for (int i = 1; i < 25; i++) { |
| 179 | for (int j = 1; j < 11; j++) { |
| 180 | if (data[i][j] == 1) {//有方块的地方把方块设置为绿色 |
| 181 | grids[i][j].setBackground(Color.GREEN); |
| 182 | } else {//无方块的地方把方块设置为白色 |
| 183 | grids[i][j].setBackground(Color.WHITE); |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | /*方块掉落一层*/ |
| 189 | public void fall(int m, int n) { |
| 190 | if (m > 0)// 方块下落一层时 |