Author

Topic: Simple gambling-helper app for roulette (Read 570 times)

newbie
Activity: 42
Merit: 0
December 25, 2013, 12: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 
#include
#include
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 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.
Jump to: