From 6e770239c86f38d79f839dc067519c09a341e1b1 Mon Sep 17 00:00:00 2001 From: greek Date: Sat, 8 Jun 2024 12:25:20 +0100 Subject: [PATCH] Only allow valid inputs as bets. --- BetInputDialog.qml | 2 ++ PlayerAreaModel.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/BetInputDialog.qml b/BetInputDialog.qml index e686a1a..e9cff57 100644 --- a/BetInputDialog.qml +++ b/BetInputDialog.qml @@ -17,6 +17,8 @@ Dialog { TextField { id: input focus: true + /* No negative numners or leading 0s, and cap at 99 million */ + validator: RegularExpressionValidator { regularExpression: /[1-9][0-9]{0,7}/ } anchors { left: parent.left diff --git a/PlayerAreaModel.cpp b/PlayerAreaModel.cpp index 5d126a3..6af42dc 100644 --- a/PlayerAreaModel.cpp +++ b/PlayerAreaModel.cpp @@ -140,7 +140,6 @@ void PlayerAreaModel::payout() if (betType != NONE) { betSpot = players.at(i).bet2.betSpot; if (betType == SINGLE && betSpot <= 35) { - printf("SINGLLEEE\n"); betSpot = 36 - betSpot; } else { betSpot += 1;