-
-
Save vaughan0/4202445 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
/** | |
* | |
* @author calbrecht | |
*/ | |
public class blockCounter { | |
private int[][] solidGameField; | |
private int sumHeightCounter; | |
private void heightCounter() | |
{ | |
sumHeightCounter = 0; | |
for (int i=0; i<solidGameField.length; i++) | |
{ | |
for (int j=0; j<solidGameField[0].length; j++) | |
{ | |
if (solidGameField[i][j] != 0 ) | |
{ | |
//sumHeightCounter += solidGameField[j].length; | |
sumHeightCounter += i; // or j, depends on which one you choose to be the y coordinate | |
} | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment