From 36f8c787217772c60aef35d87cc4942a3ab147e8 Mon Sep 17 00:00:00 2001 From: Richard Elkins Date: Tue, 2 Jul 2024 09:41:12 -0500 Subject: [PATCH] When the parameters are displayed at program start, show the list of battleground states. --- config.yaml | 10 ++++++---- helpers/config.go | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/config.yaml b/config.yaml index f3de1af..1c15864 100644 --- a/config.yaml +++ b/config.yaml @@ -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. @@ -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) diff --git a/helpers/config.go b/helpers/config.go index 08568fd..19911af 100644 --- a/helpers/config.go +++ b/helpers/config.go @@ -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 {