added helper method to convert gameboard pieces into JSON - to be used by game.jsp