Only allow valid inputs as bets.
This commit is contained in:
parent
4b19c90450
commit
6e770239c8
2 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,8 @@ Dialog {
|
||||||
TextField {
|
TextField {
|
||||||
id: input
|
id: input
|
||||||
focus: true
|
focus: true
|
||||||
|
/* No negative numners or leading 0s, and cap at 99 million */
|
||||||
|
validator: RegularExpressionValidator { regularExpression: /[1-9][0-9]{0,7}/ }
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
|
|
@ -140,7 +140,6 @@ void PlayerAreaModel::payout()
|
||||||
if (betType != NONE) {
|
if (betType != NONE) {
|
||||||
betSpot = players.at(i).bet2.betSpot;
|
betSpot = players.at(i).bet2.betSpot;
|
||||||
if (betType == SINGLE && betSpot <= 35) {
|
if (betType == SINGLE && betSpot <= 35) {
|
||||||
printf("SINGLLEEE\n");
|
|
||||||
betSpot = 36 - betSpot;
|
betSpot = 36 - betSpot;
|
||||||
} else {
|
} else {
|
||||||
betSpot += 1;
|
betSpot += 1;
|
||||||
|
|
Loading…
Reference in a new issue