Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
When the parameters are displayed at program start, show the list of …
Browse files Browse the repository at this point in the history
…battleground states.
  • Loading branch information
texadactyl committed Jul 2, 2024
1 parent 1be43da commit 36f8c78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ECVAlgorithm: 2
Battleground: AZ,GA,MI,NH,NV,PA,VA,WI
PlotHeight: 10.0
PlotWidth: 10.0
PollHistoryLimit: 3
TossupThreshold: 3.01
Battleground: AZ,GA,MI,NH,NV,PA,VA,WI

# ECVAlgorithm: Electoral College Vote Allocation Algorithm (integer)
# ECVAlgorithm: Electoral College Vote Allocation Algorithm (int)

# Other percentage = 100% - (sum percentages of the candidates).
# Difference = absolute value of the difference between candidates.
Expand All @@ -29,10 +29,12 @@ Battleground: AZ,GA,MI,NH,NV,PA,VA,WI
# If the difference between candidates is below the tossup threshold,
# it's a tossup.

# Plot height and width (float64)
# Battleground ([]string): This is the list of battleground states that are in effect with specifying -b on the command line.

# PlotHeight, PlotWidth: Plot height and width (float64)
# These are the height and width respectively, measured in the quantity of postscript points (dots)

# PollHistoryLimit: Poll History Limit (integer)
# PollHistoryLimit: Poll History Limit (int)
# Only look back this many polls or less.

# TossupThreshold: Tossup Threshold (float64)
Expand Down
1 change: 1 addition & 0 deletions helpers/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func GetConfig() {
log.Printf("GetConfig: ECVAlgorithm: %d", glob.ECVAlgorithm)

glob.Battleground = strings.Split(params.Battleground, ",")
log.Printf("GetConfig: Battleground states: %s", params.Battleground)

glob.PlotWidth, err = strconv.ParseFloat(params.PlotWidth, 64)
if err != nil {
Expand Down

0 comments on commit 36f8c78

Please sign in to comment.