Bitcoin Forum
June 19, 2024, 06:55:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Simple gambling-helper app for roulette  (Read 552 times)
nullievoid (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
December 25, 2013, 05:57:58 PM
 #1

Hello everyone. I'm willing to post a small open source program which simplifies the use of cancellation system (you can use web search for additional info on this) for roulette. It is not based on "doubling up" also known as martingale.

So far this was giving me the best chances to win compared to other methods, though it by no means a perfect one (which is simply non-existent even with no zero roulette, unless you have infinite money). The program is very basic and console based, it does not play for you, it just gives you the values to enter based on your progress and shows the current amount with 1000 as starting default. No scams or hidden malicious actions, since the C++ source is given in full free of charge.

The "Gambling" subforum seems to be filled with site advertisements only, so I'm posting it here and asking moderators to move the thread somewhere it would belong.

The source is as follows:
Code:
#include <iostream>
#include <vector>
#include <cctype>
using namespace std;

// Please edit the source to match your needs.
// Currently, assumed money is 1000 and starting bet is 2,
// with [ 1, 1 ] to cancel out.

int main()
{
const int STARTING_BET = 2;
const int STARTING_MONEY = 1000;

vector<int> numbers;
char answer, next_round;
int money = STARTING_MONEY;
int bet = STARTING_BET;

do {
for (int i = 0; i < STARTING_BET; ++i)
numbers.push_back(1);

cout << "Starting money: " << money << "." << endl;
cout << "Starting bet: " << bet << "." << endl;

while (numbers.size() > 0)
{
cout << endl << "Did you win? (y/n)" << endl;
cin >> answer;

switch (tolower(answer))
{
case 'y':
if (numbers.size() == 1)
numbers.erase(numbers.begin());
else
{
numbers.erase(numbers.begin());
numbers.erase(numbers.end() - 1);
}
money += bet;
break;
case 'n':
if (numbers.size() == 1)
numbers.push_back(numbers.back());
else
numbers.push_back(numbers.front() + numbers.back());
money -= bet;
break;
default:
cerr << "Error: wrong input." << endl;
continue;
}

bet = numbers.size() > 1 ? (numbers.front() + numbers.back()) : (numbers.front());
cout << "Current contents:" << endl;

if (numbers.size() == 0)
cout << "None!" << endl;
else
{
for (int i = 0; i < numbers.size(); ++i)
cout << numbers[i] << ' ';
cout << endl;
}

cout << "Money: " << money << endl;
cout << "Next bet to place: " << ((numbers.size() > 0) ? bet : STARTING_BET) << endl;
}
bet = STARTING_BET;

cout << endl << "Round is over! Again? (y/n)" << endl;
cin >> next_round;
} while (tolower(next_round) == 'y');

return 0;
}
You can compile it with any C++ compler, it is also not tied to a particular OS. I don't want to post a compiled binary to avoid probable accusations of malicious actions added to it. If you're on Windows and never compiled anything before, I recommend downloading a C++ IDE, one choice is Dev-C++.

And please, don't expect to win every time. You sure may be getting lucky for a good timespan, but you ultimately should know when to stop.

If this software was useful to you, you can say thanks by sending any amount of BTC to: 1P7FW5aLGwN3YhTs4xeqGaSTfJTi8u4sjx
Improved user interface may appear some time later.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!