/** * Elimination score */ private int plusExp() { // Get map information boolean[][] gameMap =
this.gameDto.getGameMap(); // Initialize the number of elimination lines int lineNum=0; // Scan the map , Judge whether the line can be cancelled for(int
y=0;y<gameMap.length;y++){ if(this.isCanRemoveLine(y, gameMap)){ // Cancelling operation
this.removeLine(y,gameMap); // Increase the number of elimination lines lineNum++; } } return lineNum; } /** * Cancelling operation
*/ private void removeLine(int rowNumber,boolean[][] gameMap){ for(int
x=0;x<GameConfig.getSystemConfig().getMaxX();x++){ for(int
y=rowNumber;y>0;y--){ gameMap[y][x]=gameMap[y-1][x]; } // The first 0 Set row to false
gameMap[0][x]=false; } } /** * Judge whether the line can be cancelled */ private boolean isCanRemoveLine(int
y,boolean[][] gameMap) { for(int
x=0;x<GameConfig.getSystemConfig().getMaxX();x++){ // As long as there is an empty line (false), It's not necessary
if(!gameMap[y][x]){ return false; } } return true; }
 

Technology
©2019-2020 Toolsou All rights reserved,
The 11th Blue Bridge Cup python The real topic of the University Group National Games JavaSwing To achieve a simple Lianliankan games 【Spring Source code analysis 】42-@Conditional Detailed explanation element-ui Step on pit record 2019PHP Interview questions ( Continuously updated )PHPJava Misunderstanding —— Method overloading is a manifestation of polymorphism ? First issue 500 100 million , Set up a new Department , What is Tencent going to do ? Google chrome The browser can't open the web page , But what if other browsers can open it ? Regression of dependent variable order categories (R language )【Golang Basic series 10 】Go language On conditional sentences if