package tictactoe.GameMechanics;

import java.util.ArrayList;
import java.util.List;

public class BoardHistory {
    private List<Board> boards = new ArrayList<Board>();

    /**
     * Ctor: board histories always start with just an empty board.
     */
    public BoardHistory() {
        boards.add(new Board());
    }

    public void addBoard(Board board) {
        boards.add(board);
    }

    public List<Board> getBoards() {
        return boards;
    }

    public int getNumBoards() {
        return boards.size();
    }

    public Board getCurrentBoard() {
        int numBoards = boards.size();
        return boards.get(numBoards - 1);
    }

    public void printCurrentBoard() {
        Board currentBoard = getCurrentBoard();
        System.out.println(currentBoard);
    }
}

@@ -107,16 +107,17 @@
 story %7B%0A
+%0A
     priv
@@ -752,38 +752,120 @@
    S
-ystem.out.println(currentBoard
+tring prettyPrintedString = currentBoard.toPrettyString();%0A        System.out.println(prettyPrintedString + %22%5Cn%22
 );%0A 

change default board print format to pretty