# Tromino puzzle

```public class TrominoPuzzle {     private int[][] tile;     private int counter;     public int[][] tile(int k, int row, int col) {         int tilelength = (int) Math.pow(2, k);         tile = new int[tilelength][tilelength];         tile[row][col] = -1;         counter = 1;         drawTromino(8,row,col);         return tile;     }     public void drawTromino(int length, int row, int col) {         if (length != 1) {             if (row <= length/2 && col <= length/2) {                 tile[length/2-1][length/2] = counter;                 tile[length/2][length/2] = counter;                 tile[length/2][length/2-1] = counter;                 counter++;                 drawTromino(length/2,length/2-1,length/2-1);             }             if (row <= length/2 && col > length/2) {                 tile[length/2-1][length/2-1] = counter;                 tile[length/2][length/2-1] = 55;                 tile[length/2-1][length/2] = counter;                 counter++;                 drawTromino(length/2,length/2-1,length/2);             }             if (row > length/2 && col <= length/2) {                 tile[length/2-1][length/2-1] = counter;                 tile[length/2-1][length/2] = counter;                 tile[length/2][length/2] = counter;                 counter++;                 drawTromino(length/2,length/2,length/2-1);             }             if (row > length/2 && col > length/2) {                 tile[length/2-1][length/2-1] = counter;                 tile[length/2-1][length/2] = counter;                 tile[length/2][length/2-1] = counter;                 counter++;                 drawTromino(length/2,length/2,length/2);             }         }     } }```