Skip to content

Commit

Permalink
update the default target level to 120; clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasAlfare committed May 16, 2023
1 parent c1cb339 commit d653742
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ class ArcheologyInfoProvider(jsonPathname: String = "src/main/resources/archeolo
}
}

fun getBestSpotsToDigOnLevel(
targetLevel: Int = 1,
fun getBestSpotsToDig(
targetLevel: Int = 120,
targetSiteName: String = ""
): List<HotspotInfo> {
val results = mutableListOf<HotspotInfo>()

val nextData =
if (targetSiteName.isNotEmpty())
data!!.sites.filter { it.name == targetSiteName }
else
data!!.sites.filter { it.name != "Special" }
if (targetSiteName.isNotEmpty()) data!!.sites.filter { it.name == targetSiteName }
else data!!.sites.filter { it.name != "Special" }

nextData.forEach { site ->
var candidate = site.hotspots.first()
Expand All @@ -52,10 +50,10 @@ class ArcheologyInfoProvider(jsonPathname: String = "src/main/resources/archeolo
}

fun getBestArtefactsToRestoreOnLevel(
targetLevel: Int = 1,
targetLevel: Int = 120,
targetSiteName: String = ""
): List<ArtefactInfo> {
val bestSpotsForLevel = getBestSpotsToDigOnLevel(
val bestSpotsForLevel = getBestSpotsToDig(
targetLevel = targetLevel,
targetSiteName = targetSiteName
)
Expand Down

0 comments on commit d653742

Please sign in to comment.