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);
|
g.setColor(Color.DARK_GRAY);
|
||||||
|
|
||||||
//shape mit 2-Forschleife
|
//shape mit 2-Forschleife
|
||||||
for(int i=0;i< shape.length;i++){
|
for(int row=0;row< shape.length;row++){
|
||||||
for(int j = 0;j< shape[0].length;j++){
|
for(int col = 0;col< shape[0].length;col++){
|
||||||
if(shape[i][j] !=null){
|
if(shape[row][col] !=null){
|
||||||
g.setColor(shape[i][j]);
|
g.setColor(shape[row][col]);
|
||||||
g.fillRect(i*BLOCK_SIZE,j*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);
|
//
|
||||||
|
g.fillRect(col*BLOCK_SIZE,row*BLOCK_SIZE,BLOCK_SIZE,BLOCK_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user