// Path: src/main/java/net/blerf/ftl/model/sectortree/SectorDot.java
// public class SectorDot {
// 	private final String sectorType;
// 	private final String sectorId;
// 	private final String sectorTitle;
// 	private boolean visited = false;
// 
// 
// 	public SectorDot(String sectorType, String sectorId, String sectorTitle) {
// 		this.sectorType = sectorType;
// 		this.sectorId = sectorId;
// 		this.sectorTitle = sectorTitle;
// 	}
// 
// 	/**
// 	 * Copy constructor.
// 	 */
// 	public SectorDot(SectorDot srcDot) {
// 		sectorType = srcDot.getType();
// 		sectorId = srcDot.getSectorId();
// 		sectorTitle = srcDot.getTitle();
// 		visited = srcDot.isVisited();
// 	}
// 
// 	public void setVisited(boolean b) { visited = b; }
// 	public boolean isVisited() { return visited; }
// 
// 	public String getType() { return sectorType; }
// 	public String getSectorId() { return sectorId; }
// 	public String getTitle() { return sectorTitle; }
// 
// 
// 	/**
// 	 * Sort of tests for equality. (Visitation is ignored.)
// 	 *
// 	 * Overriding equals()/hashCode() would mess with collections.
// 	 */
// 	public boolean isSimilarTo(SectorDot otherDot) {
// 		if (sectorType != null) {
// 			if (!sectorType.equals(otherDot.getType())) return false;
// 		}
// 		else if (otherDot.getType() != null) {
// 			return false;
// 		}
// 
// 		if (sectorId != null) {
// 			if (!sectorId.equals(otherDot.getSectorId())) return false;
// 		}
// 		else if (otherDot.getSectorId() != null) {
// 			return false;
// 		}
// 
// 		if (sectorTitle != null) {
// 			if (!sectorTitle.equals(otherDot.getTitle())) return false;
// 		}
// 		else if (otherDot.getTitle() != null) {
// 			return false;
// 		}
// 
// 		return true;
// 	}
// }


import net.blerf.ftl.model.sectortree.SectorDot;
import java.util.ArrayList;
import java.util.List;
package net.blerf.ftl.parser.sectortree;




/**
 * A generator of SectorDots to populate a SectorTree object.
 *
 * This class simply creates a list of one-dot columns.
 * Each dot has null type, null id, and "Unknown" title.
 */
public class LinearSectorTreeGenerator {

	public List<List<SectorDot>> generateSectorTree(int columnCount) {
		List<List<SectorDot>> result = new ArrayList<>(columnCount);

		for (int c=0; c < columnCount; c++) {
			List<SectorDot> columnDots = new ArrayList<>(1);

			SectorDot dot = new SectorDot(null, null, "Unknown");
			columnDots.add(dot);

			result.add(columnDots);
		}

		return result;
	}

	/**
	 * Generates an invalid tree approximating a blind visitation route.
	 *
	 * The first column will have 1 dot.
	 * Subsequent columns will have 0-or-more unvisited dots, then 1 visited.
	 * When no further visited dots remain, columns will have 1 unvisited dot.
	 * The final column will hold any excess dots.
	 */
	public List<List<SectorDot>> generateSectorTree(List<Boolean> route, int columnCount) {
		List<List<SectorDot>> result = new ArrayList<>(columnCount);

		int lastVisitedR = route.lastIndexOf(Boolean.TRUE);
		List<SectorDot> columnDots = new ArrayList<>(1);
// Path: src/main/java/net/blerf/ftl/model/sectortree/SectorDot.java
// public class SectorDot {
// 	private final String sectorType;
// 	private final String sectorId;
// 	private final String sectorTitle;
// 	private boolean visited = false;
// 
// 
// 	public SectorDot(String sectorType, String sectorId, String sectorTitle) {
// 		this.sectorType = sectorType;
// 		this.sectorId = sectorId;
// 		this.sectorTitle = sectorTitle;
// 	}
// 
// 	/**
// 	 * Copy constructor.
// 	 */
// 	public SectorDot(SectorDot srcDot) {
// 		sectorType = srcDot.getType();
// 		sectorId = srcDot.getSectorId();
// 		sectorTitle = srcDot.getTitle();
// 		visited = srcDot.isVisited();
// 	}
// 
// 	public void setVisited(boolean b) { visited = b; }
// 	public boolean isVisited() { return visited; }
// 
// 	public String getType() { return sectorType; }
// 	public String getSectorId() { return sectorId; }
// 	public String getTitle() { return sectorTitle; }
// 
// 
// 	/**
// 	 * Sort of tests for equality. (Visitation is ignored.)
// 	 *
// 	 * Overriding equals()/hashCode() would mess with collections.
// 	 */
// 	public boolean isSimilarTo(SectorDot otherDot) {
// 		if (sectorType != null) {
// 			if (!sectorType.equals(otherDot.getType())) return false;
// 		}
// 		else if (otherDot.getType() != null) {
// 			return false;
// 		}
// 
// 		if (sectorId != null) {
// 			if (!sectorId.equals(otherDot.getSectorId())) return false;
// 		}
// 		else if (otherDot.getSectorId() != null) {
// 			return false;
// 		}
// 
// 		if (sectorTitle != null) {
// 			if (!sectorTitle.equals(otherDot.getTitle())) return false;
// 		}
// 		else if (otherDot.getTitle() != null) {
// 			return false;
// 		}
// 
// 		return true;
// 	}
// }


// Path: src/main/java/net/blerf/ftl/parser/sectortree/LinearSectorTreeGenerator.java
import net.blerf.ftl.model.sectortree.SectorDot;
import java.util.ArrayList;
import java.util.List;

package net.blerf.ftl.parser.sectortree;




/**
 * A generator of SectorDots to populate a SectorTree object.
 *
 * This class simply creates a list of one-dot columns.
 * Each dot has null type, null id, and "Unknown" title.
 */
public class LinearSectorTreeGenerator {

	public List<List<SectorDot>> generateSectorTree(int columnCount) {
		List<List<SectorDot>> result = new ArrayList<>(columnCount);

		for (int c=0; c < columnCount; c++) {
			List<SectorDot> columnDots = new ArrayList<>(1);

			SectorDot dot = new SectorDot(null, null, "Unknown");
			columnDots.add(dot);

			result.add(columnDots);
		}

		return result;
	}

	/**
	 * Generates an invalid tree approximating a blind visitation route.
	 *
	 * The first column will have 1 dot.
	 * Subsequent columns will have 0-or-more unvisited dots, then 1 visited.
	 * When no further visited dots remain, columns will have 1 unvisited dot.
	 * The final column will hold any excess dots.
	 */
	public List<List<SectorDot>> generateSectorTree(List<Boolean> route, int columnCount) {
		List<List<SectorDot>> result = new ArrayList<>(columnCount);

		int lastVisitedR = route.lastIndexOf(Boolean.TRUE);
		List<SectorDot> columnDots = new ArrayList<>(1);
		result.add(columnDots);