In this exercise you will write a web page that enables a user to play the game of 15. On the page there should be a 4-by-4 board (implemented as a HTML table) with a total of 16 slots. One of the slots is empty. The other slots are occupied by 15 tiles (buttons), numbered from 1 through 15. Any tile next (either vertically or horizontally but not diagonally) to the currently empty slot can be moved into the currently empty slot by clicking on the tile. Your program should create the board with the tiles out of order. The user's goal is to arrange the tiles in sequential order row by row.
Not all configurations of the board are solvable. Only those configurations where there has been an even number of swaps can be solved. But those with odd number of swaps cannot be solved. Instead of assigning random numbers to the tiles store in an array 10 solvable configurations. Then assign one of these configurations at random when the page is loaded.
There should be an id for each table cell as well an onclick() event. The id should contain the row and column information, for example the id of the first tile could be b00 and the last tile b33. You can have a global variable that has the id of the empty cell. First check that the tile that has been clicked is adjacent to the empty cell. If it is, swap the contents. Be sure to update the global variable with the id of the new empty cell.
After you complete your web page add the information to the table that you created in your index or welcome page. Make sure that your JavaScript is running in both Firefox and IE. We should see the link before 11 PM on Friday, 14 October 2016.