class LgrfUpdater implements TreeUpdater {

	@Override
	public void updateTree(Color winner, McRunnable runnable) {
		updater.updateTree(winner, runnable);
		HistoryObserver history = runnable.getHistoryObserver();
		if (winner != VACANT) {
			Board playerBoard = runnable.getPlayer().getBoard();
			int turn = runnable.getTurn();
			boolean win = winner == playerBoard.getColorToPlay();
			StoneColor color = playerBoard.getColorToPlay();
			int t = playerBoard.getTurn();
			short penultimate = history.get(t - 2);
			short previous = history.get(t - 1);
			for (; t < turn; t++) {
				short reply = history.get(t);
				table.update(color, win, penultimate, previous, reply);
				win = !win;
				penultimate = previous;
				previous = reply;
				color = color.opposite();
			}
		}
	}

	public  LgrfUpdater(TreeUpdater updater, LgrfTable table);

}