feat: add RulesConfig with v1 defaults
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
19
source/RulesConfig.mc
Normal file
19
source/RulesConfig.mc
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user