Since it seems that nobody is willing to give their programming knowledge to the forum, I myself am going to start a course with what little I know of basic256 in my blog. Focused on the practical part.
The system I propose to do to start the course is "The Hidden or Secret Dozen". selected for its simplicity as explained in this thread:
http://betselection.cc/members'-software/roulette-key-gold-the-hidden-secret-or-dozen/msg30914/
Basic256 can be downloaded from the main website: http://www.basic256.org/index_en
The official manual can be obtained by visiting the page: http://doc.basic256.org/doku.php
Let's see where this takes us. I am nobody in the world of programming but I am willing to publish what I know and what I learn along the way. The goal is to learn and share. No monetary cost at all.
This
prompt command can be used to ask the program user what is the last number spun:
http://doc.basic256.org/doku.php?id=en:prompt
The example says
Quotea$ = prompt("What state do you live?", "KY")
For roulette we can change it to:
Quotea$ = prompt("What is the last number?", "enter number")
The program runs from top to bottom.
But we can make it go back up with the
goto command.
http://doc.basic256.org/doku.php?id=en:goto
The document says that we need a label.
Quoteskipit:
where we put the label, we can send the program there.
Quotegoto skipit
Now we will change it for the purposes of roulette:
Quoteasknumber:
a$ = prompt("What is the last number?", "enter new number")
goto asknumber
So the program starts to ask the same thing forever.
Quote from: wannawin on August 10, 2014, 03:18:37 AM
Since it seems that nobody is willing to give their programming knowledge to the forum, I myself am going to start a course with what little I know of basic256 in my blog. Focused on the practical part.
The system I propose to do to start the course is "The Hidden or Secret Dozen". selected for its simplicity as explained in this thread:
http://betselection.cc/members'-software/roulette-key-gold-the-hidden-secret-or-dozen/msg30914/ (http://betselection.cc/members'-software/roulette-key-gold-the-hidden-secret-or-dozen/msg30914/)
Basic256 can be downloaded from the main website: http://www.basic256.org/index_en (http://www.basic256.org/index_en)
The official manual can be obtained by visiting the page: http://doc.basic256.org/doku.php (http://doc.basic256.org/doku.php)
Let's see where this takes us. I am nobody in the world of programming but I am willing to publish what I know and what I learn along the way. The goal is to learn and share. No monetary cost at all.
We now need a way to stop the program.
We will use the "if" statement:
http://doc.basic256.org/doku.php?id=en:if
Also the "end" statement:
http://doc.basic256.org/doku.php?id=en:end
Quoteasknumber:
a$ = prompt("What is the last number?", "enter new number")
if a$ = "q" then
end
end if
goto asknumber
My code should look like very low level to others. Truly my programming skills do not go beyond beginner. But while the program does what it is supposed to do, the truth is it fills me with joy.
Now about the code. Each line represents an apprenticeship. Inevitably, we must be used to employ appropriate programming terms. Now we see one of them: boolean.
I learned a Boolean value is: "An expression that results in a value of either TRUE or FALSE"
Source: http://www.webopedia.com/TERM/B/Boolean_expression.html
We will use boolean values in the code to indicate whether or not the number was spun. If false, the number has not come out. If marked as true, the number came out.
I found this searching the internet:
Quote' BASIC256 used numbers to represent true and false
' values. Zero is false and anything else is true.
' The built in constants true and false exist
' and represent one and zero respectively.
print false
print true
Source: http://rosettacode.org/wiki/Boolean_values#BASIC256
This means that you can use 0 and 1 to represent true and false.
Quotenumber0 = 0
asknumber:
a$ = prompt("What is the last number?", "enter new number")
if a$ = "q" then
end
end if
if a$ = "0" then
number0 = 1
end if
goto asknumber
The new code is in bold. You can see how it is first added the variable to false, as 0.
After being evaluated if the last out is the number, with the code:
if a $ = "0" then, we proceed to mark it as true: we place number 1 in the variable.
This same procedure is done to check all the other numbers.
Quotenumber0 = 0
number1 = 0
number2 = 0
number3 = 0
number4 = 0
number5 = 0
number6 = 0
number7 = 0
number8 = 0
number9 = 0
number10 = 0
number11 = 0
number12 = 0
number13 = 0
number14 = 0
number15 = 0
number16 = 0
number17 = 0
number18 = 0
number19 = 0
number20 = 0
number21 = 0
number22 = 0
number23 = 0
number24 = 0
number25 = 0
number26 = 0
number27 = 0
number28 = 0
number29 = 0
number30 = 0
number31 = 0
number32 = 0
number33 = 0
number34 = 0
number35 = 0
number36 = 0
asknumber:
a$ = prompt("What is the last number?", "enter new number")
if a$ = "q" then
end
end if
if a$ = "0" then
number0 = 1
end if
if a$ = "1" then
number1 = 1
end if
if a$ = "2" then
number2 = 1
end if
if a$ = "3" then
number3 = 1
end if
if a$ = "4" then
number4 = 1
end if
if a$ = "5" then
number5 = 1
end if
if a$ = "6" then
number6 = 1
end if
if a$ = "7" then
number7 = 1
end if
if a$ = "8" then
number8 = 1
end if
if a$ = "9" then
number9 = 1
end if
if a$ = "10" then
number10 = 1
end if
if a$ = "11" then
number11 = 1
end if
if a$ = "12" then
number12 = 1
end if
if a$ = "13" then
number13 = 1
end if
if a$ = "14" then
number14 = 1
end if
if a$ = "15" then
number15 = 1
end if
if a$ = "16" then
number16 = 1
end if
if a$ = "17" then
number17 = 1
end if
if a$ = "18" then
number18 = 1
end if
if a$ = "19" then
number19 = 1
end if
if a$ = "20" then
number20 = 1
end if
if a$ = "21" then
number21 = 1
end if
if a$ = "22" then
number22 = 1
end if
if a$ = "23" then
number23 = 1
end if
if a$ = "24" then
number24 = 1
end if
if a$ = "25" then
number25 = 1
end if
if a$ = "26" then
number26 = 1
end if
if a$ = "27" then
number27 = 1
end if
if a$ = "28" then
number28 = 1
end if
if a$ = "29" then
number29 = 1
end if
if a$ = "30" then
number30 = 1
end if
if a$ = "31" then
number31 = 1
end if
if a$ = "32" then
number32 = 1
end if
if a$ = "33" then
number33 = 1
end if
if a$ = "34" then
number34 = 1
end if
if a$ = "35" then
number35 = 1
end if
if a$ = "36" then
number36 = 1
end if
goto asknumber
The next thing to do is to count the numbers. There have to be 25 numbers that have come out in order to determine the hidden dozen.
For this purpose I put a variable called
allnumbers . When a number is checked out as spun it is incremented by one adding it to itself.
Quotenumber0 = 0
number1 = 0
number2 = 0
number3 = 0
number4 = 0
number5 = 0
number6 = 0
number7 = 0
number8 = 0
number9 = 0
number10 = 0
number11 = 0
number12 = 0
number13 = 0
number14 = 0
number15 = 0
number16 = 0
number17 = 0
number18 = 0
number19 = 0
number20 = 0
number21 = 0
number22 = 0
number23 = 0
number24 = 0
number25 = 0
number26 = 0
number27 = 0
number28 = 0
number29 = 0
number30 = 0
number31 = 0
number32 = 0
number33 = 0
number34 = 0
number35 = 0
number36 = 0
asknumber:
allnumbers = 0
a$ = prompt("What is the last number?", "enter new number")
if a$ = "q" then
end
end if
if a$ = "0" then
number0 = 1
end if
if a$ = "1" then
number1 = 1
end if
if a$ = "2" then
number2 = 1
end if
if a$ = "3" then
number3 = 1
end if
if a$ = "4" then
number4 = 1
end if
if a$ = "5" then
number5 = 1
end if
if a$ = "6" then
number6 = 1
end if
if a$ = "7" then
number7 = 1
end if
if a$ = "8" then
number8 = 1
end if
if a$ = "9" then
number9 = 1
end if
if a$ = "10" then
number10 = 1
end if
if a$ = "11" then
number11 = 1
end if
if a$ = "12" then
number12 = 1
end if
if a$ = "13" then
number13 = 1
end if
if a$ = "14" then
number14 = 1
end if
if a$ = "15" then
number15 = 1
end if
if a$ = "16" then
number16 = 1
end if
if a$ = "17" then
number17 = 1
end if
if a$ = "18" then
number18 = 1
end if
if a$ = "19" then
number19 = 1
end if
if a$ = "20" then
number20 = 1
end if
if a$ = "21" then
number21 = 1
end if
if a$ = "22" then
number22 = 1
end if
if a$ = "23" then
number23 = 1
end if
if a$ = "24" then
number24 = 1
end if
if a$ = "25" then
number25 = 1
end if
if a$ = "26" then
number26 = 1
end if
if a$ = "27" then
number27 = 1
end if
if a$ = "28" then
number28 = 1
end if
if a$ = "29" then
number29 = 1
end if
if a$ = "30" then
number30 = 1
end if
if a$ = "31" then
number31 = 1
end if
if a$ = "32" then
number32 = 1
end if
if a$ = "33" then
number33 = 1
end if
if a$ = "34" then
number34 = 1
end if
if a$ = "35" then
number35 = 1
end if
if a$ = "36" then
number36 = 1
end if
if number0 = 1 then
allnumbers = allnumbers + 1
end if
if number1 = 1 then
allnumbers = allnumbers + 1
end if
if number2 = 1 then
allnumbers = allnumbers + 1
end if
if number3 = 1 then
allnumbers = allnumbers + 1
end if
if number4 = 1 then
allnumbers = allnumbers + 1
end if
if number5 = 1 then
allnumbers = allnumbers + 1
end if
if number6 = 1 then
allnumbers = allnumbers + 1
end if
if number7 = 1 then
allnumbers = allnumbers + 1
end if
if number8 = 1 then
allnumbers = allnumbers + 1
end if
if number9 = 1 then
allnumbers = allnumbers + 1
end if
if number10 = 1 then
allnumbers = allnumbers + 1
end if
if number11 = 1 then
allnumbers = allnumbers + 1
end if
if number12 = 1 then
allnumbers = allnumbers + 1
end if
if number13 = 1 then
allnumbers = allnumbers + 1
end if
if number14 = 1 then
allnumbers = allnumbers + 1
end if
if number15 = 1 then
allnumbers = allnumbers + 1
end if
if number16 = 1 then
allnumbers = allnumbers + 1
end if
if number17 = 1 then
allnumbers = allnumbers + 1
end if
if number18 = 1 then
allnumbers = allnumbers + 1
end if
if number19 = 1 then
allnumbers = allnumbers + 1
end if
if number20 = 1 then
allnumbers = allnumbers + 1
end if
if number21 = 1 then
allnumbers = allnumbers + 1
end if
if number22 = 1 then
allnumbers = allnumbers + 1
end if
if number23 = 1 then
allnumbers = allnumbers + 1
end if
if number24 = 1 then
allnumbers = allnumbers + 1
end if
if number25 = 1 then
allnumbers = allnumbers + 1
end if
if number26 = 1 then
allnumbers = allnumbers + 1
end if
if number27 = 1 then
allnumbers = allnumbers + 1
end if
if number28 = 1 then
allnumbers = allnumbers + 1
end if
if number29 = 1 then
allnumbers = allnumbers + 1
end if
if number30 = 1 then
allnumbers = allnumbers + 1
end if
if number31 = 1 then
allnumbers = allnumbers + 1
end if
if number32 = 1 then
allnumbers = allnumbers + 1
end if
if number33 = 1 then
allnumbers = allnumbers + 1
end if
if number34 = 1 then
allnumbers = allnumbers + 1
end if
if number35 = 1 then
allnumbers = allnumbers + 1
end if
if number36 = 1 then
allnumbers = allnumbers + 1
end if
goto asknumber
Now it is the time to tell if there are 25. If so, proceed to get the numbers that are false or unmarked as they are the numbers in the dozen of interest.
We use the "cls" statement to clear the text between spins.
http://doc.basic256.org/doku.php?id=en:cls
We use the "print" statement to send the number to text output.
http://doc.basic256.org/doku.php?id=en:print
Quotenumber0 = 0
number1 = 0
number2 = 0
number3 = 0
number4 = 0
number5 = 0
number6 = 0
number7 = 0
number8 = 0
number9 = 0
number10 = 0
number11 = 0
number12 = 0
number13 = 0
number14 = 0
number15 = 0
number16 = 0
number17 = 0
number18 = 0
number19 = 0
number20 = 0
number21 = 0
number22 = 0
number23 = 0
number24 = 0
number25 = 0
number26 = 0
number27 = 0
number28 = 0
number29 = 0
number30 = 0
number31 = 0
number32 = 0
number33 = 0
number34 = 0
number35 = 0
number36 = 0
asknumber:
allnumbers = 0
a$ = prompt("What is the last number?", "enter new number")
if a$ = "q" then
end
end if
if a$ = "0" then
number0 = 1
end if
if a$ = "1" then
number1 = 1
end if
if a$ = "2" then
number2 = 1
end if
if a$ = "3" then
number3 = 1
end if
if a$ = "4" then
number4 = 1
end if
if a$ = "5" then
number5 = 1
end if
if a$ = "6" then
number6 = 1
end if
if a$ = "7" then
number7 = 1
end if
if a$ = "8" then
number8 = 1
end if
if a$ = "9" then
number9 = 1
end if
if a$ = "10" then
number10 = 1
end if
if a$ = "11" then
number11 = 1
end if
if a$ = "12" then
number12 = 1
end if
if a$ = "13" then
number13 = 1
end if
if a$ = "14" then
number14 = 1
end if
if a$ = "15" then
number15 = 1
end if
if a$ = "16" then
number16 = 1
end if
if a$ = "17" then
number17 = 1
end if
if a$ = "18" then
number18 = 1
end if
if a$ = "19" then
number19 = 1
end if
if a$ = "20" then
number20 = 1
end if
if a$ = "21" then
number21 = 1
end if
if a$ = "22" then
number22 = 1
end if
if a$ = "23" then
number23 = 1
end if
if a$ = "24" then
number24 = 1
end if
if a$ = "25" then
number25 = 1
end if
if a$ = "26" then
number26 = 1
end if
if a$ = "27" then
number27 = 1
end if
if a$ = "28" then
number28 = 1
end if
if a$ = "29" then
number29 = 1
end if
if a$ = "30" then
number30 = 1
end if
if a$ = "31" then
number31 = 1
end if
if a$ = "32" then
number32 = 1
end if
if a$ = "33" then
number33 = 1
end if
if a$ = "34" then
number34 = 1
end if
if a$ = "35" then
number35 = 1
end if
if a$ = "36" then
number36 = 1
end if
if number0 = 1 then
allnumbers = allnumbers + 1
end if
if number1 = 1 then
allnumbers = allnumbers + 1
end if
if number2 = 1 then
allnumbers = allnumbers + 1
end if
if number3 = 1 then
allnumbers = allnumbers + 1
end if
if number4 = 1 then
allnumbers = allnumbers + 1
end if
if number5 = 1 then
allnumbers = allnumbers + 1
end if
if number6 = 1 then
allnumbers = allnumbers + 1
end if
if number7 = 1 then
allnumbers = allnumbers + 1
end if
if number8 = 1 then
allnumbers = allnumbers + 1
end if
if number9 = 1 then
allnumbers = allnumbers + 1
end if
if number10 = 1 then
allnumbers = allnumbers + 1
end if
if number11 = 1 then
allnumbers = allnumbers + 1
end if
if number12 = 1 then
allnumbers = allnumbers + 1
end if
if number13 = 1 then
allnumbers = allnumbers + 1
end if
if number14 = 1 then
allnumbers = allnumbers + 1
end if
if number15 = 1 then
allnumbers = allnumbers + 1
end if
if number16 = 1 then
allnumbers = allnumbers + 1
end if
if number17 = 1 then
allnumbers = allnumbers + 1
end if
if number18 = 1 then
allnumbers = allnumbers + 1
end if
if number19 = 1 then
allnumbers = allnumbers + 1
end if
if number20 = 1 then
allnumbers = allnumbers + 1
end if
if number21 = 1 then
allnumbers = allnumbers + 1
end if
if number22 = 1 then
allnumbers = allnumbers + 1
end if
if number23 = 1 then
allnumbers = allnumbers + 1
end if
if number24 = 1 then
allnumbers = allnumbers + 1
end if
if number25 = 1 then
allnumbers = allnumbers + 1
end if
if number26 = 1 then
allnumbers = allnumbers + 1
end if
if number27 = 1 then
allnumbers = allnumbers + 1
end if
if number28 = 1 then
allnumbers = allnumbers + 1
end if
if number29 = 1 then
allnumbers = allnumbers + 1
end if
if number30 = 1 then
allnumbers = allnumbers + 1
end if
if number31 = 1 then
allnumbers = allnumbers + 1
end if
if number32 = 1 then
allnumbers = allnumbers + 1
end if
if number33 = 1 then
allnumbers = allnumbers + 1
end if
if number34 = 1 then
allnumbers = allnumbers + 1
end if
if number35 = 1 then
allnumbers = allnumbers + 1
end if
if number36 = 1 then
allnumbers = allnumbers + 1
end if
if allnumbers = 25 then
cls
print "Hidden Dozen:"
if number0 = 0 then
print "0"
end if
if number1 = 0 then
print "1"
end if
if number2 = 0 then
print "2"
end if
if number3 = 0 then
print "3"
end if
if number4 = 0 then
print "4"
end if
if number5 = 0 then
print "5"
end if
if number6 = 0 then
print "6"
end if
if number7 = 0 then
print "7"
end if
if number8 = 0 then
print "8"
end if
if number9 = 0 then
print "9"
end if
if number10 = 0 then
print "10"
end if
if number11 = 0 then
print "11"
end if
if number12 = 0 then
print "12"
end if
if number13 = 0 then
print "13"
end if
if number14 = 0 then
print "14"
end if
if number15 = 0 then
print "15"
end if
if number16 = 0 then
print "16"
end if
if number17 = 0 then
print "17"
end if
if number18 = 0 then
print "18"
end if
if number19 = 0 then
print "19"
end if
if number20 = 0 then
print "20"
end if
if number21 = 0 then
print "21"
end if
if number22 = 0 then
print "22"
end if
if number23 = 0 then
print "23"
end if
if number24 = 0 then
print "24"
end if
if number25 = 0 then
print "25"
end if
if number26 = 0 then
print "26"
end if
if number27 = 0 then
print "27"
end if
if number28 = 0 then
print "28"
end if
if number29 = 0 then
print "29"
end if
if number30 = 0 then
print "30"
end if
if number31 = 0 then
print "31"
end if
if number32 = 0 then
print "32"
end if
if number33 = 0 then
print "33"
end if
if number34 = 0 then
print "34"
end if
if number35 = 0 then
print "35"
end if
if number36 = 0 then
print "36"
end if
end if
goto asknumber
That is it. Most likely this is low quality code for connoisseurs but it works. That is what matters to me.
I am nobody in programming and yet I managed to make a tracker. If we all share a little of what we know it will improve group knowledge for all. For sure.
Problem alert here: The forum will not let me upload the .kbs file for easy use from the basic256 program. Please Fix it.
Quote from: wannawin on August 17, 2014, 04:16:59 AMThe forum will not let me upload the .kbs file
Fixed. Kindly try again. [smiley]skype/nod.gif[/smiley]
Quote from: wannawin on August 17, 2014, 04:13:57 AM
That is it. Most likely this is low quality code for connoisseurs but it works. That is what matters to me.
I am nobody in programming and yet I managed to make a tracker. If we all share a little of what we know it will improve group knowledge for all. For sure.
This tutorial will continue on the website www.betsoftware.cc as occupations permit me. Friends: the world of programming is really fantastic. Since months ago using the goto label has opened up a world of better programs made easy. Right now I managed to make a tracker for multiple locations with this command. Basic256 is phenomenal for programming trackers for roulette . no question about it.Just imagine the number of people who withdrew their programming merely for not knowing Basic256.