Popular pages:

Roulette System

The Roulette Systems That Really Work

Roulette Computers

Hidden Electronics That Predict Spins

Roulette Strategy

Why Roulette Betting Strategies Lose

Roulette System

The Honest Live Online Roulette Casinos

Making an exe..?

Started by topcat888, January 02, 2010, 11:47:49 AM

0 Members and 1 Guest are viewing this topic.

mr.ore

Example of simple system.



namespace roulette{

/*!
* Simple Martingale system.
*/
// if you COPY-PASTE then you our selection starts right here
class Martingale : public RouletteSystem {

protected:

// how much we bet
int m_Bet;

// actual bet's identifier
int m_BetID;

// balance of this system
int m_Balance;

public:

/*!
* Reset system.
*/
virtual void reset(){
m_Bet = 1; // base bet size 1 unit
m_BetID = -1; // we did not do any bet
m_Balance = 0; // our balance is zero
}

/*!
* Place our bets.
*/
virtual void placeBets(){

// set bet's ID to -1 indicate that bet have not been made yet
m_BetID = -1; // ALWAYS reset ALL your bets ID's to -1 in placeBets() function

// we will bet only after series of black,red
if (is_event(event::_linear(2, event::black, event::red))) { // check that event
m_BetID = bet_event(event::red, m_Bet, &m_Balance); // to continuation of red

// write what we are betting on
if (printComments) {
printf("# Bet on red %d units\n", m_Bet);
// start all your messages with #, it will make them comments in gnuplot graph
// viewing application (will explain later)
}

} else { // if that event is not present

if (printComments) {
printf("# Bet nothing\n");
}

}
}

/*!
* Evaluate our bets.
*/
virtual void evaluateBets(){

// check if the bet won
if (bet_won(m_BetID)) {

// we won, tell us about it
if (printComments) {
printf("# We won on red %d units\n", m_Bet);
}

m_Bet = 1; // reset bet to 1

}

// check if the bet lost
if (bet_lost(m_BetID)) {

// we lost, tell us about it
if (printComments) {
printf("# We lost on red %d units\n", m_Bet);
}

if (m_Bet < 512) // if size of bet is lower than 512
m_Bet *= 2; // double the bet, ie. m_Bet = m_Bet * 2;
}

// if m_BetID was -1, we did not make any bet, and so neither of two above will happen
// so it is really important to reset BetId in placeBets()
//
// This is limitation of my code, I poorly designed it and so it's little junky, but still useful
//

}
};
// END OF MARTINGALE, if you COPY-PASTE then you our selection ends right here

/*!
* There you create your system from more systems if needed.
*/
void makeSystem(roulette::RouletteSystemSupervisor &system) {
using namespace roulette;

// add your martingale as only subsystem
system.addSubSystem(new Martingale());
}

}





List of some event names in code:

event::red
event::black
event::even
event::odd
event::small
event::big

Dozens and columns are indexed from zero, dozen(0) menas first dozen and so on

dozen(0) dozen(1) dozen(2)
      
column(0) column(1) column(2)

number(x)

these may not work properly in you use them with bad number, sixline(2) does not exists, but program do not care

sixline(1) ....

corner(1) ...

street(1) ...

split(1) ...



Tangram

Looks like we've got a language war going on here!  ;D

Programmers tend to get attached to whatever language they use, it becomes something of a religion. I'm not saying there's anything wrong with C++, just questioning how appropriate it is for a beginner. I don't know about run-rev because I've never used it, however it's not free (nor particularly cheap), and it seems more sensible to use an open-source (free) language until you find out whether programming is something you can do or enjoy.

I think we've put topcat off it already.  :(

VLSroulette

Quote from: topcat888 on January 02, 2010, 12:38:19 PM
Wow.! thanks for the response guys..!

ok, what I wanted to achieve was a simple gui to be the front end of a very simple Dozens system (in downloads) so nothing complicated, certainly no db, just enter the answer to three questions, what was the first dozen draw, second and third... I was going to have three drop downs with obviously the choice of L M H in each... from there it needs to return a sequence like LHML to the user... it would be nice if it could keep track if won or lost and progression as well but that is not essential... If the user could have the choice to cover the ZP as well...

That's it, but there are others that I would like to be to put into simply GUI's just for fun really....

Thanks
TC

Thanks to everyone who helped.

@TOPCAT

This is a TRACKER. No need to overcomplicate things then :)

This is an HTML page with javascript you can use:


<html>
<head>
<title>Topcat Tracker</title>
<script type="text/javascript" language="javascript">
// Coded for *topcat888* from VLSroulette.com

//Determines winning dozen and returns L, M, H or Z
function whichDozen(input)
{
//This is a very newbie-readable else-if!
if( input < 1 )
{
//0
return "Z";
}
else if ( input <= 12)
{
//1 to 12
return "L";
}
else if( input <= 24 )
{
//13 to 24
return "M";
} else if( input <= 36)
{
//25 to 36
return "H";
}
}

function printDozen(number)
{
//print it to results box
document.forms[0].results.value = document.forms[0].results.value   whichDozen(number)   " ";
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
  <script type="text/javascript" language="javascript">
  for(i = 0; i <= 36; i  )
  {
  document.write('<input type="button" name="'  i  '" value="'   i   '" onClick="printDozen('   i   ');" />');
  }
  </script>
  <p><textarea name="results" cols="80" rows="5"></textarea></p>
</form>
</body>
</html>


Download attached: [attachmini=#]

This is a working starting point for you to improve  :)

Regards.

Your friend,
Victor

topcat888

Thanks Victor, appreciate everyone's help, it gives me something to work on now...

Cheers
TC

mr.ore

Well, now comes question what is better for beginner. What is nice about java script is that all you need is browser and simple text editor. And you can do a lot, that is really good. Yes, for something like that it is ok to use javascript.

On the other way, topcat888 wanted exe file, real application, not a script, so I wanted to give him a tool, no matter what he wanted to do, it's up to him once he has the ability. I have a code that I use to simulate various systems, it is not tracker, all it does is simulation of the coded system and writing bankroll balance in gnuplot format. It would not be difficult to turn it into application that other scripts could use and add gui or automated betting or so, in unix system just use named pipes as input and output...

If you look into that zip file, there is much more, than that simple system. It is more like my personal toolkit for roulette simulation, there is a lot of useful things like ability to combine more systems into one, describing progressions with finite  automaton, tracking of simple moving average over some variable and some other stuff. But there are no comments, so it may be difficult for someone to use it.

Well, because I really like programming, I added user input in hope it will be useful and posted it here. When I have more time I will turn it into more useful tracker, add commments and post it do download section, all what is needed is to add printing of some messages to some places which will tell us what the system do and what happened in game.

Another reason to use C++ is the amount of various libraries you can use. Normally I use GSL library, and have no problems with it in linux gcc compiler. The fact that DevCpp has buggy package in repository or maybe another error made me to comment out GSL from posted code, making it less useful. If you have right compiler and no buggy one, you can uncomment macro USE_GSL in roulette.cpp and have support for advanced RNGs, and can use in your code statistics functions from that library and other stuff if you want. Anyway, DevCPP is still good for beginners, have nice IDE and integrated debugger and is simple and installation is small compared to MSVC. Probably all what is needed is to download and compile GSL yourself in DevCpp to make it work, maybe I will do it later.

spining7

[quote author=mr.ore


List of some event names in code:

event::red
event::black
event::even
event::odd
event::small
event::big

Dozens and columns are indexed from zero, dozen(0) menas first dozen and so on

dozen(0) dozen(1) dozen(2)
      
column(0) column(1) column(2)

number(x)

these may not work properly in you use them with bad number, sixline(2) does not exists, but program do not care

sixline(1) ....

corner(1) ...

street(1) ...

split(1) ...



[/quote]

What is "small" and "big" I'm not familiar with the language you speak of? Much as sometimes I see unfamiliar abreviations.

mr.ore

And now simple tutorial for topcat888:

Put this code just under the comment // END OF MARTINGALE, ...

class MyTracker : public RouletteSystem {
  protected:

  public:

    virtual void reset(){

     }
   
    virtual void placeBets() {

    }
   
    virtual void evaluateBets() {

    }
   
};

and in makeSystem comment out with // that martingal like this

//system.addSubSystem(new Martingale());

and add under it

system.addSubSystem(new MyTracker());

This is the the simplest existing system, it does nothing. If you compile compile it fith CTRL+F9 and run with F9, nothing will be happening, you will be able to input number and end it with -1, but no writes.

What is it doing?

There are three methods:

1. reset() { <your code here> } will be executed once when application starts. There you MUST set your variables to have some value. You can call this method from the other two methods with reset(); if you wanted reset of your system later again.

2. placeBets() { <your code here> } will be executed before spin, ie. before you enter number in. You bet your bets here. You can add some text output here what you need to see before you make real spin and enter the number to tracker.

3. evaluateBets() { <your code here> } will be executed after spin, there you know, if your bets won or lost, and you can change your bets here or reset(); and such things.

The structure of the programme looks like this:

reset();
while (!quit) {
  placeBets(); spin(); evaluateBets(); // repeats them in this order until not quit of application
}

Now lets say you wanted to track what happened on dozens and write info about it, then you can change code in placeBets() like this:

virtual void placeBets() {

  if ( is_event(event::number(0)) ) {
    printf("# Z\n"); // printf("xxx"); prints xxx to console
  } else if ( is_event(event::dozen(0)) ) {
    printf("# L\n"); // \n means new line after we write what is before
  } else if ( is_event(event::dozen(1)) ) {
    printf("# M\n");
  } else if ( is_event(event::dozen(2)) ) {
    printf("# H\n");
  }

}

Final code for recapitulation:



class MyTracker : public RouletteSystem {
  protected:

  public:

    virtual void reset() {

    }

    virtual void placeBets() {
if ( is_event(event::number(0)) ) {
printf("# Z\n");
      } else if ( is_event(event::dozen(0)) ) {
printf("# L\n");
} else if ( is_event(event::dozen(1)) ) {
printf("# M\n");
} else if ( is_event(event::dozen(2)) ) {
printf("# H\n");
}
    }

    virtual void evaluateBets() {

    }
   
};


/*!
* There you create your system from more systems if needed.
*/
void makeSystem(roulette::RouletteSystemSupervisor &system) {
using namespace roulette;

// add your martingale as only subsystem
// system.addSubSystem(new Martingale());
system.addSubSystem(new MyTracker());
}




You got your tracker. Try it and try also that javascript, do both, it's best way to learn.

BTW. I recommend to disable Smart Tabs in Editor options ind DevCpp, they really do weird things.

VLSroulette

Dear Mr. Ore,

Taking the time to help a fellow member of the forum is quite nice of you  :good:

I do agree with C++ for a simple reason: once you get used to C++, being a multipurpose language, you have it for mostly everything you want to make. From CGI applications to scripts/trackers and everything else.

It may take a while more to code but it does get the job done.

When thinking a bit, my proposed javascript tracker may be a stretch as topcat wanted a .exe, but no matter what language is used, what is important is end-user satisfaction  ;) Programmers should never forget about that.

...Feel free to use whatever approach you wish topcat, anyway is good, as long as you have your coding job achieved.

Regards.

mr.ore

There is a function

bool is_event(event::<xxx>) which returns true if the event is true according to last number entered, false otherwise.

In C++ there is construction:

if ( condition ) {
  do something
}

or

if ( condition ) {
  do something
} else {
  do something else
}

or generally

if ( condition 1) {
  <do something>
}else if ( condition 2) {
  <do something else 2>
}else if ( condition 3) {
  <do something else 3>
} else {
  <do something else>
}

if condition is numerically equal to zero, then it is false, otherwise it is true, ie. 0 is false, 1,-1,123 are all logicaly true.

With function you can check what happened.

There is another function, bet_event(event::<xxx>, amount) and some more variations of it. You call it in placeBets() { <...> }

in each spin, if you call bet_even

m_BetX_ID = bet_event(event::<xxx>, amount) ;

unique id is given to the  bet, first bet gets 0, second 1, and so on.

in evaluateBets() { <...> } you can use function

bet_won(ID) which returns true if bet with that id won, else false

because IDs are each spin counted from zero, if you do not do some bet in placeBets(), you should set it's ID to -1, otherwise you could end up asking to result of absolutely different bet. Simply: just set your bets id's in the beginning of makeBets() to -1.

With this, look at the martingale example, and try to understand it.

gizmotron

As far as run rev goes it starts out free.  nolinks://revmedia.runrev.com/beginners-guide/how-it-works/

If you plan on using it for further work it is great for CGI, web applications, and cross platform deployment of stand alone applications.

Here is a sim coded &  pasted into a simple button that produces results in a text field:

on mouseUp
  put "" into field "f1"
  put "" into wowie
  repeat with n = 1 to 100
     put "" into y
     repeat with x = 1 to 38
        put random(37) into z
        if z is among the items of y then
           put z & "," after y
           exit repeat
        end if
        put z & "," after y
     end repeat
     put the number of items in y into wow
     put y & " -- " & wow & return after wowie
  end repeat
  put wowie into field "f1"
end mouseUp


Here are some results:


16,34,15,35,29,34, -- 6
2,32,25,28,5,17,8,9,24,31,21,32, -- 12
32,22,21,1,36,12,23,10,37,9,15,15, -- 12
12,3,30,1,31,1, -- 6
23,31,33,32,27,37,31, -- 7
24,7,19,22,30,19, -- 6
23,20,12,9,3,24,20, -- 7
23,35,22,13,33,33, -- 6
4,21,25,3,20,2,31,19,30,36,37,11,18,6,32,31, -- 16
34,4,27,30,1,27, -- 6
22,25,31,36,5,34,15,8,34, -- 9
19,23,36,31,28,29,8,12,37,35,8, -- 11
20,29,9,26,37,33,24,7,36,4,2,26, -- 12
8,2,36,14,10,35,30,35, -- 8
34,12,23,12, -- 4
2,35,26,35, -- 4
34,30,22,9,6,27,1,16,17,3,36,21,34, -- 13
28,1,24,24, -- 4
30,29,21,22,33,10,7,18,20,18, -- 10
28,6,15,24,15, -- 5
30,30, -- 2
32,24,32, -- 3
12,5,6,13,34,5, -- 6
21,9,32,14,37,5,16,2,26,12,1,9, -- 12
13,4,5,5, -- 4
32,21,16,11,36,15,19,1,35,16, -- 10
36,8,20,20, -- 4
27,1,19,21,24,37,20,31,20, -- 9
2,27,1,12,29,24,15,3,11,28,10,9,3, -- 13
21,9,5,26,37,30,14,37, -- 8
8,23,18,26,31,26, -- 6
10,5,36,18,30,7,4,12,22,7, -- 10
31,32,23,23, -- 4
6,6, -- 2
29,2,30,13,35,27,28,27, -- 8
3,13,35,37,30,30, -- 6
12,1,18,4,29,16,36,20,24,3,12, -- 11
35,28,20,18,12,9,31,8,6,11,12, -- 11
18,26,28,5,28, -- 5
4,8,19,12,30,14,36,9,16,2,13,14, -- 12
15,26,25,29,3,28,30,1,13,12,25, -- 11
23,36,21,16,6,17,26,35,2,9,3,10,37,5,23, -- 15
24,19,5,23,6,20,28,19, -- 8
28,19,32,29,2,8,9,14,13,18,30,6,33,17,2, -- 15
36,14,4,31,36, -- 5
31,25,1,8,26,24,1, -- 7
11,21,16,34,28,1,9,20,10,34, -- 10
33,26,18,33, -- 4
16,11,13,15,26,22,10,31,25,8,25, -- 11
29,3,22,27,8,25,16,7,34,22, -- 10
33,14,20,5,27,35,37,16,22,3,28,28, -- 12
14,7,33,15,32,30,9,35,7, -- 9
37,22,25,11,26,27,36,31,18,29,4,2,22, -- 13
36,14,28,7,3,36, -- 6
22,37,32,5,27,32, -- 6
17,7,19,2,34,29,8,6,28,34, -- 10
24,21,21, -- 3
12,34,30,22,10,14,5,21,11,23,15,12, -- 12
36,24,17,16,5,23,26,19,11,12,34,4,36, -- 13
25,6,13,22,23,18,7,36,24,20,4,12,7, -- 13
26,34,23,1,3,19,7,27,33,23, -- 10
1,5,13,5, -- 4
19,26,11,29,23,12,17,36,16,34,17, -- 11
21,8,19,15,5,22,15, -- 7
28,13,16,32,22,12,13, -- 7
18,15,13,6,33,17,24,34,15, -- 9
12,5,24,15,16,28,31,2,16, -- 9
4,34,4, -- 3
4,26,37,5,7,14,3,31,30,30, -- 10
32,14,18,29,34,6,31,13,37,25,31, -- 11
20,20, -- 2
15,35,4,33,21,17,7,25,24,11,33, -- 11
30,37,30, -- 3
19,37,21,25,32,12,13,6,27,2,16,32, -- 12
20,14,13,22,4,37,10,2,14, -- 9
18,25,5,9,32,35,16,31,24,24, -- 10
13,13, -- 2
14,31,5,35,8,14, -- 6
12,34,21,14,19,23,4,17,19, -- 9
22,36,5,22, -- 4
7,23,8,32,32, -- 5
5,7,8,13,37,4,11,31,22,10,14,17,12,9,23,17, -- 16
8,7,20,24,22,31,1,1, -- 8
23,25,34,30,35,4,17,1,8,15,21,2,33,9,21, -- 15
35,30,8,19,30, -- 5
8,11,17,25,10,19,15,27,1,7,12,25, -- 12
20,2,20, -- 3
7,23,34,30,13,29,18,20,31,35,2,23, -- 12
21,4,1,3,37,19,24,19, -- 8
13,3,22,8,36,13, -- 6
5,15,24,1,9,2,35,36,5, -- 9
16,32,25,1,22,29,25, -- 7
8,21,18,28,17,16,28, -- 7
16,34,24,17,30,1,17, -- 7
15,32,33,15, -- 4
36,21,4,27,3,32,15,16,16, -- 9
18,28,29,25,8,9,31,37,8, -- 9
25,34,9,29,28,34, -- 6
6,2,29,28,11,14,24,24, -- 8
11,10,33,21,23,27,21, -- 7

Tangram

Quote from: VLSrouletteI do agree with C++ for a simple reason: once you get used to C++, being a multipurpose language, you have it for mostly everything you want to make. From CGI applications to scripts/trackers and everything else.

That's true, but it isn't the only general-purpose language, and it's far from being the easiest to learn. For topcat's purposes it's a sledgehammer to crack a nut. The syntax of runrev looks quite readable and intuitive (like Euphoria), unlike C/C++. Even computer science students don't start learning something as hard as C++ straight away, back in my day you would start off with Pascal, then maybe move on to C (not sure what they do these days, Java seems to be very popular). With C++ you have all the object-oriented stuff to learn, on top of the unintuitive syntax. And if you want to create a GUI, you have to write a lot of code to even produce a blank window. C/C++ are quite "low-level" languages, great for writing drivers and operating systems, but something higher level is better for GUI Apps.

nolinks://nolinks.rapideuphoria.com/c.htm

Anyway, let us know how you get on. Don't give up too soon, programming has quite a steep learning curve, but once you "get it" you might find yourself hooked!  ;)

topcat888

Crikey never meant to start this..!   :-[

mr.ore I have tried some of what you said and will continue when I have bit more time, thanks for your effort. To everyone else thank you for your suggestions and advice, I understand about the sledgehammer and I'm going to spend some 'quiet' time going through it all, see where I get from there...

Cheers
TC




Tiago2

My advice is Delphi. Its what I use to create all my program. There is a free version out witch is very good. Its called Turbo Delphi. Also theres alot of video tutorials that teach you hot to code with it. Here's the link

nolinks://blogs.embarcadero.com/nickhodges/2006/08/15/26687

All the best

superman

A program I have been using to make my bots is called Autoit, my background is in PHP/MySql, Autoit was fairly easy to get into as it is MADE to run and interact with windoze.  Not sure if I can paste their address so just go google "Autoit" the forum is also very helpfull.

superman

-