You are designing a video game version of one of the most well known board games, chess. To start, you have decided to build the programming necessary to have a working digital pawn on your 8x8 chessboard. Take a few chessboard arrays that have been created, check to see if you can move the pawn up one space, capture another pawn if possible, and promote the pawn to a Queen if it reaches the other side. You will not have to program for the "En Passant" maneuver for this exercise. In the array, spaces are represented by ' ', while any pawns are represented by 'p'. Queens are represented by 'Q'. As an example, [ [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', 'p', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '] ]; should look like this to your computer when you are done: [ [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', 'p', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '] ];
// Your code here function chessBoard(board) { for(var i = 0; i < board.length; i++){ for(var j = 0; j < board[i].length; j++){ if(board[i][j] == 'p'){ board[i][j] = ' '; board[i-1][j] = 'p'; } } } return board; } // Tests Test.describe("Basic Tests", function() { var board = [ [' ',' ',' ',' ',' ',' ',' ',' '], [' ',' ',' ',' ',' ',' ',' ',' '], [' ',' ',' ',' ',' ',' ',' ',' '], [' ',' ',' ','p',' ',' ',' ',' '], [' ',' ',' ',' ',' ',' ',' ',' '], [' ',' ',' ',' ',' ',' ',' ',' '], [' ','