package net.woodyfolsom.msproj.sgf;

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

public class GameTree {
	private List<Node> nodeSequence = new ArrayList<Node>();
	private List<GameTree> subTrees = new ArrayList<GameTree>();
	
	
	public int getNodeCount() {
		return nodeSequence.size();
	}
	
	public List<Node> getNodeSequence() {
		return Collections.unmodifiableList(nodeSequence);
	}
	
	public void setNodeSequence(List<Node> nodeSequence) {
		this.nodeSequence.clear();
		
		for(Node node : nodeSequence) {
			this.nodeSequence.add(node);
		}
	}
	
	public void addSubTree(GameTree subTree) {
		subTrees.add(subTree);
	}
	
	public int getSubTreeCount() {
		return subTrees.size();
	}
}
