Question: Using java, edit the code below to implement Triomino Tiling. - Recursively tile a 2^k by 2^k 2D int array with right triominos. (where k
Using java, edit the code below to implement Triomino Tiling.
- Recursively tile a 2^k by 2^k 2D int array with right triominos. (where k is input by the user)
- Start with one square tiled at random(where one spot in the 2D array is one)
- don't have to use method "isQuadrantEmpty" but can add other methods

example output:

public class Project1 { // This is the ONLY private data you may have: // Global counter used to uniquely label triominos private static int counter = 1; public static void main(String args[]) { System.out.println("!! Welcome to Project 1 !!"); Scanner in = new Scanner(System.in); System.out.print("Enter exponent: "); int exp = in.nextInt(); // Your code goes here. System.out.println("Done. Normal termination."); }
public static void tileCheckerboardRec(int[][] board, int left, int right, int top, int bottom) { // Your code goes here. }
public static boolean isQuadrantEmpty(int[][] board, int left, int right, int top, int bottom) { // Your code goes here. }
public static int[][] getRandomBoard(int exp) { // Your code goes here. // Don't forget to increment counter in here. }
public static void printBoard(int[][] board) { // Your code goes here. } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
