_ /h\_ \_/ \_ /v\_/ \_ \_/ \_/ \ /v\_/h\_/ \_/ \_/ \ /v\_/ \_/ \_/ \_/ \ \_/ \_/ \_/ \ \_/
Above is a picture of a 4 x 4 Hex game in progress. The board is a 4 x 4 collection of hexagons packed together, with 4 hexagons in each vertical column, and 4 hexagons in each diagonal from upper left to lower right. Two players play against each other. One of the players ('h') tries to make a horizontal chain of adjacent hexagons stretching between the left and right of the board. The other player ('v') tries to make a vertical chain of adjacent hexagons stretching from the bottom to the top of the board.
We can refer to any position on the board by a pair of coordinates giving the diagonal distance and vertical distance from the upper left hexagon. Using these coordinates, the two hexagons marked 'h' are located at (0,0) and at (2,1).
Given the size of the board and a list of all the marked hexagons, we want software that can draw the board using characters as shown above. Create a class Hex that contains a method picture that is given n (the vertical and diagonal size of the board) and marks (a list of all the marked hexagons) and that returns a picture of the board in the format shown above. The return will be a String that if printed one String per line in order would produce the picture. Each element of the return should have no trailing spaces, and at least one of the elements should have no leading spaces.
marks will be a String in which each element will consist of exactly 3 characters: two digits giving the diagonal and then the vertical coordinate of a hexagon, followed by either 'v' or 'h', the marking of that hexagon.
|-||n will be between 2 and 10 inclusive.|
|-||marks will contain between 0 and 50 elements inclusive.|
|-||Each element of marks will contain exactly 3 characters.|
|-||The first 2 characters in each element of marks will be digits less than n.|
|-||The last character in each element of marks will be 'v' or 'h'.|
|-||No 2 elements of marks will refer to the same hexagon.|