-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbet.cpp
605 lines (437 loc) · 20.9 KB
/
bet.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
#include <cstdlib>
#include "bet.h"
#include "mainwindow.h"
#include "./ui_mainwindow.h"
double SixEightPay = 1.16667;
double FiveNinePay = 1.4; /// odds for payout
double FourTenPay = 1.8;
double SevenPay = 4;
double ThreeElevenPay = 15;
double TwoTwelvePay = 30;
double PassLinePay = 2;
double Bet::balance; /// player balance
double Bet::betPlace[6]; /// array to hold place bets
double Bet::betOt[5]; /// array to hold one time bets
double Bet::table[3];
int Bet::Roll::dice1;
int Bet::Roll::dice2;
int Bet::Roll::diceSum;
double Bet::Roll::betAmount;
bool Bet::Roll::onPoint;
int Bet::Roll::point;
double Bet::Roll::passOdds;
int Bet::Stored::sum; /// stored used for repeat bet
int Bet::Stored::sum2;
double Bet::Stored::betPlace[6];
double Bet::Stored::betOt[5];
void MainWindow::point() /// sets point and holds untill 7 rolled
{
if(Bet::Roll::diceSum == 4){
Bet::Roll::point = 4;
Bet::Roll::onPoint = true;
ui->pointButton->setChecked(Bet::Roll::onPoint);
}else if(Bet::Roll::diceSum == 5){
Bet::Roll::point = 5;
Bet::Roll::onPoint = true;
ui->pointButton->setChecked(Bet::Roll::onPoint);
}else if(Bet::Roll::diceSum == 6){
Bet::Roll::point = 6;
Bet::Roll::onPoint = true;
ui->pointButton->setChecked(Bet::Roll::onPoint);
}else if(Bet::Roll::diceSum == 8){
Bet::Roll::point = 8;
Bet::Roll::onPoint = true;
ui->pointButton->setChecked(Bet::Roll::onPoint);
}else if(Bet::Roll::diceSum == 9){
Bet::Roll::point = 9;
Bet::Roll::onPoint = true;
ui->pointButton->setChecked(Bet::Roll::onPoint);
}else if(Bet::Roll::diceSum == 10){
Bet::Roll::point = 10;
Bet::Roll::onPoint = true;
ui->pointButton->setChecked(Bet::Roll::onPoint);
}else
Bet::Roll::onPoint = false;
ui->pointButton->setChecked(Bet::Roll::onPoint);
ui->pointLabel->setNum(Bet::Roll::point);
}
void MainWindow::passBetOn() /// enable/disable pass line bets
{
if(Bet::Roll::onPoint == true){
ui->betPushButton->setEnabled(false);
}
}
void MainWindow::roll() /// rolls dice
{
srand(time(0));
Bet::Roll::dice1 = (int) (1+rand()%6);
Bet::Roll::dice2 = (int) (1+rand()%6);
Bet::Roll::diceSum = Bet::Roll::dice1 + Bet::Roll::dice2;
ui->label->setText(tr(" "));
ui->oRepeatButton->setEnabled(true); /// enable repeat onetime bet button
}
void MainWindow::fund() /// deposit funds
{
if(Bet::balance <= 0){
Bet::balance = ui->doubleSpinBox->value();
ui->fundsSpinBox->setValue(Bet::balance);
}else{
Bet::balance = ui->fundsSpinBox->value();
double addBal = ui->doubleSpinBox->value();
ui->fundsSpinBox->setValue(Bet::balance + addBal);
}
ui->label->setText(tr("DEPOSIT SUCCESSFUL"));
}
void MainWindow::pass() /// make a pass or don't pass bet
{
int index = ui->comboBox->currentIndex();
if(ui->fundsSpinBox->value() <= 0){
ui->label->setText(tr("NOT ENOUGH FUNDS"));
return;
}else if(ui->amountSpinBox_2->value() <= 0){
ui->label->setText(tr("SELECT AMOUNT TO BET"));
return;
}else
Bet::Roll::betAmount = ui->amountSpinBox_2->value();
Bet::balance = ui->fundsSpinBox->value();
ui->fundsSpinBox->setValue(Bet::balance - Bet::Roll::betAmount);
switch (index){
case 0:
Bet::table[0] += Bet::Roll::betAmount;
ui->label->setText(tr("PASS LINE BET"));
break;
case 1:
Bet::table[1] += Bet::Roll::betAmount;
ui->label->setText(tr("DONT PASS BET"));
break;
}
ui->passSpinBox->setValue(Bet::table[0]);
ui->dontSpinBox->setValue(Bet::table[1]);
}
void MainWindow::place() /// place bets on table, they will remain untill 7 rolled
{
if(ui->fundsSpinBox->value() <= 0){
ui->label->setText(tr("NOT ENOUGH FUNDS"));
return;
}else if(ui->amountSpinBox->value() <= 0){
ui->label->setText(tr("SELECT AMOUNT TO BET"));
return;
}else
Bet::Roll::betAmount = ui->amountSpinBox->value();
Bet::balance = ui->fundsSpinBox->value();
ui->fundsSpinBox->setValue(Bet::balance - Bet::Roll::betAmount);
if(ui->betSpinBox->value() == 4){
Bet::betPlace[0] += Bet::Roll::betAmount;
ui->label->setText(tr("BET PLACED ON 4"));
if(ui->fourSpinBox->value() <= 0){
ui->fourSpinBox->setValue(Bet::betPlace[0]);
}else
ui->fourSpinBox->setValue(ui->fourSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 5){
Bet::betPlace[1] += Bet::Roll::betAmount;
ui->label->setText(tr("BET PLACED ON 5"));
if(ui->fiveSpinBox->value() <= 0){
ui->fiveSpinBox->setValue(Bet::betPlace[1]);
}else
ui->fiveSpinBox->setValue(ui->fiveSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 6){
Bet::betPlace[2] += Bet::Roll::betAmount;
ui->label->setText(tr("BET PLACED ON 6"));
if(ui->sixSpinBox->value() <= 0){
ui->sixSpinBox->setValue(Bet::betPlace[2]);
}else
ui->sixSpinBox->setValue(ui->sixSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 8){
Bet::betPlace[3] += Bet::Roll::betAmount;
ui->label->setText(tr("BET PLACED ON 8"));
if(ui->eightSpinBox->value() <= 0){
ui->eightSpinBox->setValue(Bet::betPlace[3]);
}else
ui->eightSpinBox->setValue(ui->eightSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 9){
Bet::betPlace[4] += Bet::Roll::betAmount;
ui->label->setText(tr("BET PLACED ON 9"));
if(ui->nineSpinBox->value() <= 0){
ui->nineSpinBox->setValue(Bet::betPlace[4]);
}else
ui->nineSpinBox->setValue(ui->nineSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 10){
Bet::betPlace[5] += Bet::Roll::betAmount;
ui->label->setText(tr("BET PLACED ON 10"));
if(ui->tenSpinBox->value() <= 0){
ui->tenSpinBox->setValue(Bet::betPlace[5]);
}else
ui->tenSpinBox->setValue(ui->tenSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 2){
Bet::betOt[0] += Bet::Roll::betAmount;
ui->label->setText(tr("ONE TIME BET PLACED ON 2"));
if(ui->twoSpinBox->value() <= 0){
ui->twoSpinBox->setValue(Bet::betOt[0]);
}else
ui->twoSpinBox->setValue(ui->twoSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 3){
Bet::betOt[1] += Bet::Roll::betAmount;
ui->label->setText(tr("ONE TIME BET PLACED ON 3"));
if(ui->threeSpinBox->value() <= 0){
ui->threeSpinBox->setValue(Bet::betOt[1]);
}else
ui->threeSpinBox->setValue(ui->threeSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 7){
Bet::betOt[2] += Bet::Roll::betAmount;
ui->label->setText(tr("ONE TIME BET PLACED ON 7"));
if(ui->sevenSpinBox->value() <= 0){
ui->sevenSpinBox->setValue(Bet::betOt[2]);
}else
ui->sevenSpinBox->setValue(ui->sevenSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 11){
Bet::betOt[3] += Bet::Roll::betAmount;
ui->label->setText(tr("ONE TIME BET PLACED ON 11"));
if(ui->elevenSpinBox->value() <= 0){
ui->elevenSpinBox->setValue(Bet::betOt[3]);
}else
ui->elevenSpinBox->setValue(ui->elevenSpinBox->value() + Bet::Roll::betAmount);
}else if(ui->betSpinBox->value() == 12){
Bet::betOt[4] += Bet::Roll::betAmount;
ui->label->setText(tr("ONE TIME BET PLACED ON 12"));
if(ui->twelveSpinBox->value() <= 0){
ui->twelveSpinBox->setValue(Bet::betOt[4]);
}else
ui->twelveSpinBox->setValue(ui->twelveSpinBox->value() + Bet::Roll::betAmount);
}else;
}
void MainWindow::rPlace() /// remove a place bet or a one time bet
{
Bet::balance = ui->fundsSpinBox->value();
Bet::Roll::betAmount = ui->amountSpinBox->value();
if(ui->RBetSpinBox->value() == 4){
Bet::balance += ui->fourSpinBox->value();
Bet::betPlace[0] = 0;
Bet::Stored::betPlace[0] = Bet::betPlace[0];
ui->fourSpinBox->setValue(Bet::betPlace[0]);
ui->label->setText(tr("BET CLEARED ON 4"));
}else if(ui->RBetSpinBox->value() == 5){
Bet::balance += ui->fiveSpinBox->value();
Bet::betPlace[1] = 0;
Bet::Stored::betPlace[1] = Bet::betPlace[1];
ui->fiveSpinBox->setValue(Bet::betPlace[1]);
ui->label->setText(tr("BET CLEARED ON 5"));
}else if(ui->RBetSpinBox->value() == 6){
Bet::balance += ui->sixSpinBox->value();
Bet::betPlace[2] = 0;
Bet::Stored::betPlace[2] = Bet::betPlace[2];
ui->sixSpinBox->setValue(Bet::betPlace[2]);
ui->label->setText(tr("BET CLEARED ON 6"));
}else if(ui->RBetSpinBox->value() == 8){
Bet::balance += ui->eightSpinBox->value();
Bet::betPlace[3] = 0;
Bet::Stored::betPlace[3] = Bet::betPlace[3];
ui->eightSpinBox->setValue(Bet::betPlace[3]);
ui->label->setText(tr("BET CLEARED ON 8"));
}else if(ui->RBetSpinBox->value() == 9){
Bet::balance += ui->nineSpinBox->value();
Bet::betPlace[4] = 0;
Bet::Stored::betPlace[4] = Bet::betPlace[4];
ui->nineSpinBox->setValue(Bet::betPlace[4]);
ui->label->setText(tr("BET CLEARED ON 9"));
}else if(ui->RBetSpinBox->value() == 10){
Bet::balance += ui->tenSpinBox->value();
Bet::betOt[5] = 0;
Bet::Stored::betPlace[5] = Bet::betPlace[5];
ui->tenSpinBox->setValue(Bet::betPlace[5]);
ui->label->setText(tr("BET CLEARED ON 10"));
}else if(ui->RBetSpinBox->value() == 2){
Bet::balance += Bet::betOt[0];
Bet::betOt[0] = 0;
ui->label->setText(tr("BET CLEARED ON 2"));
ui->twoSpinBox->setValue(Bet::betOt[0]);
}else if(ui->RBetSpinBox->value() == 3){
Bet::balance += Bet::betOt[1];
Bet::betOt[1] = 0;
ui->label->setText(tr("BET CLEARED ON 3"));
ui->threeSpinBox->setValue(Bet::betOt[1]);
}else if(ui->RBetSpinBox->value() == 7){
Bet::balance += Bet::betOt[2];
Bet::betOt[2] = 0;
ui->label->setText(tr("BET CLEARED ON 3"));
ui->sevenSpinBox->setValue(Bet::betOt[2]);
}else if(ui->RBetSpinBox->value() == 11){
Bet::balance += Bet::betOt[3];
Bet::betOt[3] = 0;
ui->label->setText(tr("BET CLEARED ON 11"));
ui->elevenSpinBox->setValue(Bet::betOt[3]);
}else if(ui->RBetSpinBox->value() == 12){
Bet::balance += Bet::betOt[4];
Bet::betOt[4] = 0;
ui->label->setText(tr("BET CLEARED ON 12"));
ui->twelveSpinBox->setValue(Bet::betOt[4]);
}else;
ui->fundsSpinBox->setValue(Bet::balance);
}
void MainWindow::outcome()
{
ui->lcdNumber->display(Bet::Roll::dice1);
ui->lcdNumber_2->display(Bet::Roll::dice2); /// display for dice
ui->lcdNumber_3->display(Bet::Roll::diceSum);
switch (Bet::Roll::onPoint){
case 0:
if(Bet::Roll::diceSum == 7){
std::fill_n(Bet::betPlace, 6, 0); /// clears place bets if 7 rolled
Bet::Roll::point = 0;
ui->pointLabel->setNum(Bet::Roll::point); /// clears point int
Bet::Roll::onPoint = false;
ui->pointButton->setChecked(Bet::Roll::onPoint); /// point button on/off
ui->betPushButton->setEnabled(true); /// resets pass line bet
ui->repeatButton->setEnabled(true);
ui->fundsSpinBox->setValue(Bet::balance += Bet::table[0] -= Bet::table[1]); /// ?weird start glitch added +10 for pass line if 7 rolled?
std::fill_n(Bet::table, 2, 0);
ui->passSpinBox->setValue(Bet::table[0]);
ui->dontSpinBox->setValue(Bet::table[1]);
ui->fourSpinBox->setValue(Bet::betPlace[0]);
ui->fiveSpinBox->setValue(Bet::betPlace[1]);
ui->sixSpinBox->setValue(Bet::betPlace[2]);
ui->eightSpinBox->setValue(Bet::betPlace[3]);
ui->nineSpinBox->setValue(Bet::betPlace[4]);
ui->tenSpinBox->setValue(Bet::betPlace[5]);
}
else if(Bet::Roll::diceSum == 11){
ui->fundsSpinBox->setValue(Bet::balance += Bet::table[0] -= Bet::table[1]);
std::fill_n(Bet::table, 2, 0);
ui->passSpinBox->setValue(Bet::table[0]);
ui->dontSpinBox->setValue(Bet::table[1]);
}else if(Bet::Roll::diceSum == 12){
Bet::table[0] = 0;
ui->passSpinBox->setValue(Bet::table[0]);
ui->dontSpinBox->setValue(Bet::table[1]);
}else if(Bet::Roll::diceSum == 2){
ui->fundsSpinBox->setValue(Bet::balance += Bet::table[1] -= Bet::table[0]);
std::fill_n(Bet::table, 2, 0);
ui->passSpinBox->setValue(Bet::table[0]);
ui->dontSpinBox->setValue(Bet::table[1]);
}else if(Bet::Roll::diceSum == 3){
ui->fundsSpinBox->setValue(Bet::balance += Bet::table[1] -= Bet::table[0]); /// 2 || 3 kept ending in this outcome
std::fill_n(Bet::table, 2, 0);
ui->passSpinBox->setValue(Bet::table[0]);
ui->dontSpinBox->setValue(Bet::table[1]);
}else {
ui->passSpinBox->setValue(Bet::table[0]);
ui->dontSpinBox->setValue(Bet::table[1]);
}break;
case 1:
if(Bet::Roll::diceSum == 7){
std::fill_n(Bet::betPlace, 6, 0); /// clears place bets if 7 rolled
Bet::Roll::point = 0;
ui->pointLabel->setNum(Bet::Roll::point); /// clears point int
Bet::Roll::onPoint = false;
ui->pointButton->setChecked(Bet::Roll::onPoint); /// point button on/off
ui->betPushButton->setEnabled(true); /// resets pass line bet
ui->repeatButton->setEnabled(true);
ui->fourSpinBox->setValue(Bet::betPlace[0]);
ui->fiveSpinBox->setValue(Bet::betPlace[1]);
ui->sixSpinBox->setValue(Bet::betPlace[2]);
ui->eightSpinBox->setValue(Bet::betPlace[3]);
ui->nineSpinBox->setValue(Bet::betPlace[4]);
ui->tenSpinBox->setValue(Bet::betPlace[5]);
ui->label->setText(tr("7 OUT!!!"));
}else {
ui->passSpinBox->setValue(Bet::table[0]);
ui->dontSpinBox->setValue(Bet::table[1]);
}
}
}
void MainWindow::payOut() /// payout if a bet is placed on the number rolled
{
Bet::balance = ui->fundsSpinBox->value();
if(Bet::Roll::diceSum == 4){
Bet::balance += ui->fourSpinBox->value() * FourTenPay;
}else if(Bet::Roll::diceSum == 5){
Bet::balance += ui->fiveSpinBox->value() * FiveNinePay;
}else if(Bet::Roll::diceSum == 6){
Bet::balance += ui->sixSpinBox->value() * SixEightPay;
}else if(Bet::Roll::diceSum == 7){
Bet::balance += ui->sevenSpinBox->value() * SevenPay;
}else if(Bet::Roll::diceSum == 8){
Bet::balance += ui->eightSpinBox->value() * SixEightPay;
}else if(Bet::Roll::diceSum == 9){
Bet::balance += ui->nineSpinBox->value() * FiveNinePay;
}else if(Bet::Roll::diceSum == 10){
Bet::balance += ui->tenSpinBox->value() * FourTenPay;
}else if(Bet::Roll::diceSum == 2){
Bet::balance += ui->twoSpinBox->value() * TwoTwelvePay;
}else if(Bet::Roll::diceSum == 3){
Bet::balance += Bet::betOt[1] * ThreeElevenPay;
}else if(Bet::Roll::diceSum == 11){
Bet::balance += Bet::betOt[2] * ThreeElevenPay;
}else if(Bet::Roll::diceSum == 12){
Bet::balance += Bet::betOt[3] * TwoTwelvePay;
}else;
ui->fundsSpinBox->setValue(Bet::balance);
std::fill_n(Bet::betOt, 5, 0);
ui->twoSpinBox->setValue(Bet::betOt[0]);
ui->threeSpinBox->setValue(Bet::betOt[1]);
ui->sevenSpinBox->setValue(Bet::betOt[2]);
ui->elevenSpinBox->setValue(Bet::betOt[3]);
ui->twelveSpinBox->setValue(Bet::betOt[4]);
}
void MainWindow::pointPayout()
{
if(Bet::Roll::diceSum == Bet::Roll::point){
Bet::balance += Bet::table[0] * PassLinePay;
ui->fundsSpinBox->setValue(Bet::balance);
Bet::Roll::onPoint = false;
ui->pointButton->setChecked(Bet::Roll::onPoint);
Bet::Roll::point = 0; /// pays out pass line if point hit 1 to 1
ui->betPushButton->setEnabled(true); /// and pass bet cleared added to balance
ui->pointLabel->setNum(Bet::Roll::point);
std::fill_n(Bet::table, 2, 0);
ui->pointLabel->setNum(Bet::Roll::point);
ui->passSpinBox->setValue(Bet::table[0]);
ui->dontSpinBox->setValue(Bet::table[1]);
}else if(Bet::Roll::diceSum == 7){
Bet::balance += Bet::table[1] * PassLinePay;
ui->fundsSpinBox->setValue(Bet::balance); /// pays out don't pass line if
std::fill_n(Bet::table, 2, 0); /// 7 comes before point hit and
ui->dontSpinBox->setValue(Bet::table[0]); /// don't pass returned to balance
ui->passSpinBox->setValue(Bet::table[1]);
}
}
void MainWindow::takeState() ///used to take bet values for repeat bet
{
Bet::Stored::betPlace[0] = ui->fourSpinBox->value();
Bet::Stored::betPlace[1] = ui->fiveSpinBox->value();
Bet::Stored::betPlace[2] = ui->sixSpinBox->value();
Bet::Stored::betPlace[3] = ui->eightSpinBox->value();
Bet::Stored::betPlace[4] = ui->nineSpinBox->value();
Bet::Stored::betPlace[5] = ui->tenSpinBox->value();
Bet::Stored::betOt[0] = ui->twoSpinBox->value();
Bet::Stored::betOt[1] = ui->threeSpinBox->value();
Bet::Stored::betOt[2] = ui->sevenSpinBox->value();
Bet::Stored::betOt[3] = ui->elevenSpinBox->value();
Bet::Stored::betOt[4] = ui->twelveSpinBox->value();
}
void MainWindow::repeatBet() /// repeat last bet (place only)
{
Bet::Stored::sum = 0;
for(auto& num : Bet::Stored::betPlace) /// adds array total sum and
Bet::Stored::sum += num; /// minus from balance
ui->fundsSpinBox->setValue(Bet::balance -= Bet::Stored::sum);
ui->repeatButton->setEnabled(false);
ui->fourSpinBox->setValue(Bet::Stored::betPlace[0]);
ui->fiveSpinBox->setValue(Bet::Stored::betPlace[1]);
ui->sixSpinBox->setValue(Bet::Stored::betPlace[2]);
ui->eightSpinBox->setValue(Bet::Stored::betPlace[3]);
ui->nineSpinBox->setValue(Bet::Stored::betPlace[4]);
ui->tenSpinBox->setValue(Bet::Stored::betPlace[5]);
}
void MainWindow::oRepeatBet()
{
Bet::Stored::sum2 = 0;
for(auto& num : Bet::Stored::betOt)
Bet::Stored::sum2 += num;
ui->fundsSpinBox->setValue(Bet::balance -= Bet::Stored::sum2);
ui->oRepeatButton->setEnabled(false);
ui->twoSpinBox->setValue(Bet::Stored::betOt[0]);
ui->threeSpinBox->setValue(Bet::Stored::betOt[1]);
ui->sevenSpinBox->setValue(Bet::Stored::betOt[2]);
ui->elevenSpinBox->setValue(Bet::Stored::betOt[3]);
ui->twelveSpinBox->setValue(Bet::Stored::betOt[4]);
}