[Pharo] Personal fitness tracker web app.
Introduce core domain concept of 'intensity factor'.
Changed files
src/MyFitnessTracker-Core/MFTSetGroupLog.class.st
@@ -49,6 +49,14 @@
49
49
notes := String new
50
50
]
51
51
52
Added:
{ #category : 'as yet unclassified' }
53
Added:
MFTSetGroupLog >> intensityFactor [
54
Added:
55
Added:
^ sets
56
Added:
ifEmpty: [ 0 ]
57
Added:
ifNotEmpty: [ (sets collect: #intensityFactor) max ]
58
Added:
]
59
Added:
52
60
{ #category : 'initialization' }
53
61
MFTSetGroupLog >> isCompletelyLogged [
54
62
@@ -96,5 +104,5 @@
96
104
{ #category : 'initialization' }
97
105
MFTSetGroupLog >> sets: aMFTSetLogCollection [
98
106
99
Removed:
sets := aMFTSetLogCollection asOrderedCollection
107
Added:
sets := aMFTSetLogCollection
100
108
]
src/MyFitnessTracker-Core/MFTSetLog.class.st
@@ -61,6 +61,21 @@
61
61
]
62
62
63
63
{ #category : 'initialization' }
64
Added:
MFTSetLog >> initialize [
65
Added:
66
Added:
super initialize.
67
Added:
failureAchieved := false
68
Added:
]
69
Added:
70
Added:
{ #category : 'as yet unclassified' }
71
Added:
MFTSetLog >> intensityFactor [
72
Added:
73
Added:
failureAchieved ifTrue: [ ^ 100 ].
74
Added:
"TODO: determine intensity factor as a function of PR"
75
Added:
^ 50
76
Added:
]
77
Added:
78
Added:
{ #category : 'initialization' }
64
79
MFTSetLog >> isLogged [
65
80
66
81
^ reps isNotNil and: [ load isNotNil ]
src/MyFitnessTracker-Core/MFTWorkoutLog.class.st
@@ -95,6 +95,14 @@
95
95
setGroups := OrderedCollection new
96
96
]
97
97
98
Added:
{ #category : 'as yet unclassified' }
99
Added:
MFTWorkoutLog >> intensityFactor [
100
Added:
101
Added:
^ setGroups
102
Added:
ifEmpty: [ 0 ]
103
Added:
ifNotEmpty: [ (setGroups collect: #intensityFactor) max ]
104
Added:
]
105
Added:
98
106
{ #category : 'testing' }
99
107
MFTWorkoutLog >> isCompletelyLogged [
100
108