adjust countRoad in SiedlerGame
This commit is contained in:
parent
a79e1eefe3
commit
21f144b294
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="openjdk-17" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" default="true" project-jdk-name="openjdk-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
|
@ -508,6 +508,9 @@ public class SiedlerGame {
|
|||
*/
|
||||
private HashSet<Road> countRoad(Config.Faction faction,Point position,HashSet<Road> roads,boolean add) {
|
||||
List<Road> roadslist = board.getAdjacentEdges(position);
|
||||
if(board.getCorner(position) != null || board.getCorner(position).getFaction() != faction) {
|
||||
return roads;
|
||||
}
|
||||
|
||||
Iterator it2 = roads.iterator();
|
||||
while(it2.hasNext()) {
|
||||
|
|
Loading…
Reference in New Issue