java.lang.Object
com.deco2800.game.areas.MapGenerator.pathBuilding.CheckConnectivity
public class CheckConnectivity
extends Object
-
Constructor Summary
Constructors
Constructs an instance of CheckConnectivity.
-
Method Summary
List<com.badlogic.gdx.math.GridPoint2>
check(List<com.badlogic.gdx.math.GridPoint2> toGenerateFrom)
Determines if a graph of positions is connected with paths and returns all disconnected
points.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CheckConnectivity
Constructs an instance of CheckConnectivity. Used for determining if a graph (i.e. path system)
is connected.
- Parameters:
pg
- an instance of PathGenerator
-
Method Details
-
check
public List<com.badlogic.gdx.math.GridPoint2> check(List<com.badlogic.gdx.math.GridPoint2> toGenerateFrom)
Determines if a graph of positions is connected with paths and returns all disconnected
points.
- Parameters:
toGenerateFrom
- list of vertices
- Returns:
- a list of disconnected vertices