• Welcome to #1 Roulette Forum & Message Board | www.RouletteForum.cc.

News:

Progression bets are nothing more than different size bets on different spins. You could get lucky and win big, or unlucky and lose even more.

Main Menu
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

Programming Tutorial for those who knows nothing.

Started by WannaWin, May 24, 06:53 AM 2011

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mr.ore

This program in sikuli has about 189 lines and can already track numbers. There is some junk code already, and it's design will have to be polished or changed somehow...

[reveal]from javax.swing import (BoxLayout, ImageIcon, JButton, JFrame, JPanel,
        JPasswordField, JLabel, JTextArea, JTextField, JScrollPane,
        SwingConstants, WindowConstants)
from java.awt import Component, GridLayout

# object with roulette tracker
class MyRoulette(object):
def __init__(self):
# roulette related data
self.reds   = [ 1, 3, 5, 7,  9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36]
self.blacks = [ 2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35]
self.evens  = [ 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36]
self.odds   = [ 1, 3, 5, 7,  9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35]
self.lows   = [ 1, 2, 3, 4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
self.highs  = [19,20,21,22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]

self.dozens = [
[ 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]
]

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

self.numbers = []
self.progression = [1, 2, 4, 8, 16]
self.progressionPosition = 1


# window with caption
self.frame = JFrame("My roulette tracker", size=(256,512))

# panel 2x2
self.panel = JPanel(GridLayout(2,2))
self.frame.add(self.panel)

# text area for past numbers
#self.numbersArea = JTextArea(
# text = "",
# editable = False,
# wrapStyleWord = True,
# lineWrap = True,
# alignmentX = Component.LEFT_ALIGNMENT
#,size = (128,480)
# )
self.numbersAreaHtml = ""
self.numbersArea = JLabel(self.numbersAreaHtml)
self.numbersArea.setVerticalAlignment(SwingConstants.TOP)

self.numbersScrollpane = JScrollPane(
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER
)
self.numbersScrollpane.viewport.view = self.numbersArea

self.initialText = "<html>\n" + "Color and font test:\n" + "<ul>\n" + "<li><font color=red>red</font>\n" + "<li><font color=blue>blue</font>\n" + "<li><font color=green>green</font>\n" + "<li><font size=-2>small</font>\n" + "<li><font size=+2>large</font>\n" +"<li><i>italic</i>\n" + "<li><b>bold</b>\n" +"</ul>\n";

# text area for progression
#self.progressionArea = JTextArea(
# text = initialText,
# editable = False,
# wrapStyleWord = True,
# lineWrap = True,
# alignmentX = Component.LEFT_ALIGNMENT
#,size = (128,480)
# )
self.progressionAreaHtml = ""
self.progressionArea = JLabel(self.progressionAreaHtml)

self.progressionScrollpane = JScrollPane(
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER
)
self.progressionScrollpane.viewport.view = self.progressionArea

# text area for input
self.inputArea = JTextArea(
text = "",
editable = True,
wrapStyleWord = True,
lineWrap = True,
alignmentX = Component.LEFT_ALIGNMENT
#,size = (1,64)
)

# button
self.buttonInsertNumber = JButton(
"Insert number",
actionPerformed=self.insert_number
)
#self.buttonInsertNumber = JButton("<html><b><u>T</u>wo</b><br>lines</html>");

# insert all parts into the window's panel
self.panel.add(self.numbersScrollpane)
self.panel.add(self.progressionScrollpane)
self.panel.add(self.inputArea)

self.panel.add(self.buttonInsertNumber)

# make the window smaller
self.frame.pack()

# show window
self.frame.setAlwaysOnTop(True)
self.show()

def makeNumbersAreaHtml(self):
html = "<html><table>"
for number in self.numbers:
html += "<tr><td align=right width=32 >"
if (number>0) and (number<37):
if number in self.reds:
html += "<font color=red>"+str(number)+"</font>"
else:
html += "<font color=black>"+str(number)+"</font>"
elif number==0:
html += "<font color=green>0</font>"
elif number==37:
html += "<font color=green>00</font>"
html += "</td>"
html += "<td></td>"

if number in self.reds:
html += "<td>R</td>"
elif number in self.blacks:
html += "<td>B</td>"
else:
html += "-"

if number in self.evens:
html += "<td>E</td>"
elif number in self.odds:
html += "<td>O</td>"
else:
html += "<td>-</td>"

if number in self.lows:
html += "<td>L</td>"
elif number in self.highs:
html += "<td>H</td>"
else:
html += "<td>-</td>"

html += "<td></td>"

for dozen in self.dozens:
if number in dozen:
html += "<td>X</td>"
else:
html += "<td></td>"

html += "<td></td>"

for column in self.columns:
if number in column:
html += "<td>X</td>"
else:
html += "<td></td>"
html += "</tr>"
html += "</table></html>"
return html

def insert_number(self, event):
print "insert_number: " + self.inputArea.text
try:

if self.inputArea.text=="00":
self.number = 37
else:
self.number = int(self.inputArea.text)
if (self.number < 0) or (self.number > 36):
raise ValueError
self.numbers.append(self.number)

self.numbersArea.text = self.makeNumbersAreaHtml()

except ValueError:
popup("Error: 00 or numbers 0-36 expected")
self.inputArea.text = ""

def show(self):
self.frame.visible = True


MyRoulette()
[/reveal]

Bayes

Hi Wannawin,

If you want to write GUI trackers and the like I can't think of anything easier than Euphoria, which is the language I use. Euphoria is also good for stats/simulations and isn't object-oriented which makes it easier for a beginner. It has a GUI library which includes a visual editor for creating windows without having to write code - it's generated for you, just add code for what you want to happen when you click a button etc. This sounds a bit like visual Basic but it's even easier, there really isn't an easier way to write windows programs that I know of. link:://:.rapideuphoria.com

I'm also a Ubuntu user so I can help you with getting it set up etc. Or, having invested some time and effort in FreeBASIC, you may wish to persevere with it. Unfortunately I can't help as I don't know the language, I just recommended a BASIC because it's easy for beginners.
"The trouble isn't what we don't know, it's what we think we know that just ain't so!" - Mark Twain

Bayes

Wannawin,

Let me know exactly what you want to create (as long as it's not too complex), and I'll give you step-by-step demo of how to do it in Euphoria.  :thumbsup:
"The trouble isn't what we don't know, it's what we think we know that just ain't so!" - Mark Twain

mr.ore

Bayes, he already wrote what he wanted to do:

QuoteMy head is spinning trying to make a window with a list for numbers and a list to keep track of progression. I must say at the moment I'm lost.

So the application will have some textbox with numbers, texbox with a progression, input for a new number and a button to enter that number. Progression might be anything - for example martingale as the most simple progression. There might be of course only one textbox and the progression might be written on the same line as the number entered.

So you might show us how to do it in euphoria, I would do similar thing in jython  :thumbsup:.

WannaWin

Thank you very much for the help.

My first program takes a list for numbers that have already came from spin 1 to 12.

From spin 13 the bet is set to group with only 1 time out in the list with progression.

The betting is set from spin 13 to 25. If no hit after spin 25 it is a loss.

Then we wait 12 more numbers and repeat the process with list set with last 12 numbers again and bet 1 time numbers in the list from spin 13 to spin 25.

Perhaps after a loss it can climb the progression starting from 2 units, and so on, until you recover or reach a level of defined complete loss. In which case all bets must go back to 1 unit again.

I want to learn if it may be the same for windows and ubuntu. So I can share with friends that use windows and some others that use Linux.

If you do not have to make too many changes for this it is good too. I do not want is having to do the programing twice. I know it is possible to make because there are programming languages ​​that offer Linux and Windows versions of the same.

Thank you very much for your advices and I want to consider my options for now.

WannaWin
Roulette is the hardest game and the more exciting for everyone because it is easy to operate and pays 35 to 1.

Bayes

Quote from: WannaWin on May 30, 03:33 PM 2011
I want to learn if it may be the same for windows and ubuntu. So I can share with friends that use windows and some others that use Linux.

If you do not have to make too many changes for this it is good too. I do not want is having to do the programing twice. I know it is possible to make because there are programming languages ​​that offer Linux and Windows versions of the same.
Euphoria programs will run on Linux and Windows, with only minor changes necessary (if at all) in the code. The GUI library I use is Windows only, but that's no problem because you can use Wine (type 'sudo apt-get install wine' at the console or get it using the Ubuntu software centre).

Sidenote There are actually 2 versions of Euphoria - the latest (version 4.1) has more commands and is more complex than the earlier version (3.1.1). I use version 3.1.1 and suggest you do the same to begin with, it's simpler and there is more documentation for it.

You can download both Windows and Linux versions from the link I gave above (but make sure you have Wine installed first before installing the windows version.

Next, you need to download the EuWinGUI library - go here and download the 'Euwingui library and IDE' (3rd from the top).

Assuming you have the Windows version of Euphoria installed, extract the Euwingui folder into its directory (you should have a menu item to access the the C:\ directory - see screenshot).

[attachimg=#]

Now, just one more step before you can begin using the library. In the EuWinGUI folder you will see other folders including 'Bin' and 'Include'. You need to 1) move the contents of the Bin directory into the EUPHORIA Bin directory, and 2) move the contents of the Include directory into the EUPHORIA Include directory.

Now check that everything is ok by running some of the programs in the EWG-Demos folder.

Ok, I'll stop here until I hear from you that it's running ok. I don't want to give you information overload and I think it's better to keep this in a tutorial style, so next I'll ask you to create your GUI using the IDE - you don't need to write any code for this, it's all point and click graphics.

p.s. When installing Euphoria for Linux, you need to add a couple of lines to your bash_profile in order to run the interpreter from the console. You will find instructions in the package, but let me know if you need help.  :thumbsup:

"The trouble isn't what we don't know, it's what we think we know that just ain't so!" - Mark Twain

WannaWin

Thanks Mr. Bayes. I'll try to do those steps.

WannaWin
Roulette is the hardest game and the more exciting for everyone because it is easy to operate and pays 35 to 1.

WannaWin

Hello. With a referral from Mr. Esoito I am going to take the programming course by Mr. Victor

link:://rouletteforum.cc/VLS'-view-b57/vic's-programming-school-for-the-absolute-newbies/

Hopefully it will be easier than simple languages ​​I've seen so far. And the good thing is to have someone whom you can ask and can not escape from here >:D

Since I have no hurry to learn I can take my time to produce the files.

Thank you all for your programming suggestions.

If I learn to code programs I hope to contribute many of them to the forum.

WannaWin
Roulette is the hardest game and the more exciting for everyone because it is easy to operate and pays 35 to 1.

-