Files
garmin-padel/source/RulesConfig.mc

20 lines
798 B
MonkeyC
Raw Normal View History

import Toybox.Lang;
// Configurable padel rules. v1 uses the defaults below; a future settings
// screen will mutate an instance of this class — the engine reads it as-is.
class RulesConfig {
public var goldenPoint as Boolean; // true = sudden death at 40-40
public var gamesPerSet as Number; // games needed to take a set (before win-by-2)
public var setsToWin as Number; // sets needed to win the match
public var tiebreakEnabled as Boolean; // play a tiebreak at gamesPerSet-all
public var tiebreakTarget as Number; // points needed to win a tiebreak (before win-by-2)
public function initialize() {
goldenPoint = true;
gamesPerSet = 6;
setsToWin = 2;
tiebreakEnabled = true;
tiebreakTarget = 7;
}
}