import java.util.*; public class TilePuzzle { private boolean bGameOver = false; private final int size = 4; // define instance variables here // implement this method to initialize a random puzzle public void buildBoard() { } // implement this method to move the tile according to the command public void move(char command) { } // implement this method to display the board public void displayBoard() { } // check whether the game is over public boolean isGameOver() { return bGameOver; } // you can use this method to swap two elements if needed // swap the element at (i, j) with the one at (p, q) in the 2D array, arr private static void swap(int[][] arr, int i, int j, int p, int q) { int temp = arr[i][j]; arr[i][j] = arr[p][q]; arr[p][q] = temp; } }