public class PathConstraints {
	private bool air;
	private bool sea;
	private bool land;

	public PathConstraints(bool air, bool sea, bool land) {
		this.air = air;
		this.sea = sea;
		this.land = land;
    }

	public bool canGoThrough(TerrainTriangle triangle) {
		if (air) {
			return true;
		}

		if (triangle.getTerrain().getAltitude() >= 0 && land) {
			return true;
		}

		if (triangle.getTerrain().getAltitude() < 0 && sea) {
			return true;
		}

		return false;
    }
}
