breaking the coupling between strokes and putts
This commit is contained in:
@@ -273,9 +273,6 @@ static void down_click_handler(ClickRecognizerRef recognizer, void *context) {
|
|||||||
HoleScore *hole = &s_scores[s_current_hole];
|
HoleScore *hole = &s_scores[s_current_hole];
|
||||||
if (hole->strokes > 0) {
|
if (hole->strokes > 0) {
|
||||||
hole->strokes--;
|
hole->strokes--;
|
||||||
if (hole->putts > hole->strokes) {
|
|
||||||
hole->putts = hole->strokes;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
APP_LOG(APP_LOG_LEVEL_DEBUG, "ACT:DOWN hole=%d str=%d ptt=%d",
|
APP_LOG(APP_LOG_LEVEL_DEBUG, "ACT:DOWN hole=%d str=%d ptt=%d",
|
||||||
s_current_hole + 1, hole->strokes, hole->putts);
|
s_current_hole + 1, hole->strokes, hole->putts);
|
||||||
@@ -298,9 +295,6 @@ static void up_long_handler(ClickRecognizerRef recognizer, void *context) {
|
|||||||
HoleScore *hole = &s_scores[s_current_hole];
|
HoleScore *hole = &s_scores[s_current_hole];
|
||||||
if (hole->putts < 99) {
|
if (hole->putts < 99) {
|
||||||
hole->putts++;
|
hole->putts++;
|
||||||
if (hole->putts > hole->strokes && hole->strokes < 99) {
|
|
||||||
hole->strokes = hole->putts;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
APP_LOG(APP_LOG_LEVEL_DEBUG, "ACT:LONG_UP hole=%d str=%d ptt=%d",
|
APP_LOG(APP_LOG_LEVEL_DEBUG, "ACT:LONG_UP hole=%d str=%d ptt=%d",
|
||||||
s_current_hole + 1, hole->strokes, hole->putts);
|
s_current_hole + 1, hole->strokes, hole->putts);
|
||||||
|
|||||||
Reference in New Issue
Block a user