summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2022-11-03 12:05:26 -0400
committerAndrew Cady <d@jerkface.net>2022-11-03 12:05:37 -0400
commitdc5a8f2b008d20491b81108a3eccd24e23f379ac (patch)
tree6382fda7d2a1c9ee6816924881bb7456607aa8d9
parent51610f0f9babbbbef2e6adfee85940c4a52e81b9 (diff)
factor
-rwxr-xr-xrepgoal.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/repgoal.hs b/repgoal.hs
index bec0252..ab50b67 100755
--- a/repgoal.hs
+++ b/repgoal.hs
@@ -191,16 +191,16 @@ drawUI st = [vCenter $ vBox [hCenter $ hBox [header, oneRepMaxTable], withVScrol
191 repGoal = computeRepGoal targetWeight stats 191 repGoal = computeRepGoal targetWeight stats
192 goalTo1RM g = computeOneRepMax $ Achieved g targetWeight 192 goalTo1RM g = computeOneRepMax $ Achieved g targetWeight
193 showGoal g = printf "%2d @ %d ≈ 1 @ %s" g targetWeight (showRational (goalTo1RM g)) 193 showGoal g = printf "%2d @ %d ≈ 1 @ %s" g targetWeight (showRational (goalTo1RM g))
194 pad = padBottom (Pad $ if amrap then 1 else 0)
194 in 195 in
195 map (padLeftRight 2) 196 map (padLeftRight 2)
196 [ 197 [
197 -- txt $ if position == FirstInList then liftName else " ", 198 pad $ txt $ case position of FirstInList -> liftRecordName; NotFirstInList -> " ",
198 txt $ case position of FirstInList -> liftName; NotFirstInList -> if amrap then " \n " else " ", 199 pad $ str $ printf "%2d%s @ %d" targetReps (if amrap then "+" else "" :: Text) targetWeight,
199 str $ printf "%2d%s @ %d%s" targetReps (if amrap then "+" else "" :: Text) targetWeight (if amrap then "\n " else "" :: String), 200 pad $ str $ showPlates targetWeight,
200 str $ showPlates targetWeight ++ if amrap then "\n " else "",
201 str $ if amrap then showGoal repGoal ++ "\n" ++ showGoal (repGoal + 1) else " ", 201 str $ if amrap then showGoal repGoal ++ "\n" ++ showGoal (repGoal + 1) else " ",
202 txt $ if amrap then " \n " else " ", 202 pad $ txt " ",
203 txt $ if amrap then " \n " else " " 203 pad $ txt " "
204 ] 204 ]
205 205
206showPlates :: Integer -> String 206showPlates :: Integer -> String