Skip to content

Commit

Permalink
adds new constraint for mutations and genome
Browse files Browse the repository at this point in the history
  • Loading branch information
Corvette653 committed Jan 24, 2024
1 parent 98dc2ca commit 8c3e860
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/kotlin/backend/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ data class Config(
requireField(initialPlants <= mapWidth * mapHeight) { "Initial plants must be less or equal to map size" }
requireField(minMutations <= maxMutations) { "Min mutations must be less or equal to max mutations" }
requireField(maxMutations <= genomeLength) { "Max mutations must be less or equal to genome length" }
requireField(maxMutations * (1 + mutationVariant) <= genomeLength) { "Switch mutations take two genes for one mutation" }
requireField(plantsPerDay <= mapWidth * mapHeight) { "Plants per day must be less or equal to map size" }
requireField(!csvExportEnabled || validate<Filename>(filename)) { "Filename must be valid when csv export is enabled" }
}
Expand Down

0 comments on commit 8c3e860

Please sign in to comment.