(3 pts) Problem 3
Within AVeryFunGame.java, write a method public static void shiftLeft(int[] x, int index)
that shifts the elements of x to the left (i.e., down by one index) starting from the specified index and
going to the end of the array. The element at index should be replaced, and the last element in the
array should be replaced with 0.
For example, if x initially contains 1, 2, 3, 4, and 5 followed by 40 zeros, calling shiftLeft(x, 2) should
change x to contain 1, 2, 4, and 5 followed by 41 zeros.
(3 pts) Problem 4
Within AVeryFunGame.java, write a method public static void takeTurn(int[] piles) that takes
one turn of the game based on the configuration in piles. Call your previously-written methods as
needed.
For example, if piles contains 14, 6, 1, 12, 1, and 8 followed by 39 zeros, calling takeTurn(piles)
should change piles to contain 13, 5, 11, 3, 7, and 6 followed by 30 zeros.