row and col
This commit is contained in:
parent
23c795a2e7
commit
2215dc0ba7
Binary file not shown.
@ -41,11 +41,12 @@ public class Board extends JPanel
|
||||
g.setColor(Color.DARK_GRAY);
|
||||
|
||||
//shape mit 2-Forschleife
|
||||
for(int i=0;i< shape.length;i++){
|
||||
for(int j = 0;j< shape[0].length;j++){
|
||||
if(shape[i][j] !=null){
|
||||
g.setColor(shape[i][j]);
|
||||
g.fillRect(i*BLOCK_SIZE,j*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);
|
||||
for(int row=0;row< shape.length;row++){
|
||||
for(int col = 0;col< shape[0].length;col++){
|
||||
if(shape[row][col] !=null){
|
||||
g.setColor(shape[row][col]);
|
||||
//
|
||||
g.fillRect(col*BLOCK_SIZE,row*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user