About Lotto7   

(Please be patient for this page to load, there are a lot of images all for your benifit est 93secs)


Lotto7 is to be the next upgrade from my original Lotto5 program for the Psion. I have decided to program this next version in Java for many reasons and hope it will speed along my learning of this new language. I have released this first module and hope in time to produce a few more modules and create a complete Lottery package.

Beleive it or not I am not a gambling man you probably imagine me to be. I probably play the Brtish National Lottery once a month. I can't remember my last cash win!!


How to use the Abbreviated Wheel

7wh0point.jpg (28770 bytes)

The help button on the module displays several guide lines of text, and I believe this html page will give you a far better idea on how to use the abbreviated Wheel. When you first run the program you will be displayed with the following, if not you require the Java VM Plugin available from www.sun.com .

                          Screen Shot

The first thing you want to do is to get the module to display all available wheels. You can do this by pressing on any of the top buttons. Each one of the five buttons will list the wheels available sorted by that field. The screen shot below shows the wheels sorted by the Wheel Number. Use the scroll bar on the side to see all the wheels.

                          Screen shot

When you see a wheel you want to use, and for our example we are going to use wheel 38, you must press on the arrows just below the 'Wheel No' button and get it to show 38. You must then click in the window showing 38 to get it to select and fill in the other '0' boxes with values.

                          Screen shot

Now that the other boxes have values you must select your numbers to wheel. The box under the 'No's Required' button shows you how many numbers to pick. Pick the numbers from the numbers box on the left hand side. Your numbers will appear in the blue bar. For or example we have selected 12 numbers.

                          Screen shot

You may sort all 12 numbers in the blue bar by pressing the 'Sort' Button.

                          Screen shot

You are now ready to get the module to calculate your combinations.Press the calculate button. Wheel number 0 takes a few minutes to calculate but all the others take a few seconds. This is due to the real time hole checking routine. Wheel 0 having to make over 376,000 combination checks.

                          Screen shot

Expand the screen to see all the combinations and if you require a hard copy you will have to get a screen capture.

                           Screen shot

Combination Check Routine  -- for those interested

private void jbVerifyPressed (java.awt.event.MouseEvent evt) {
CalculateCondition();
if (calculate == true) {
Calculate();
OutputArea.append(System.getProperty("line.separator"));
OutputArea.append("Checking lines for all Possible Draws.");OutputArea.append(System.getProperty("line.separator"));
int ValNosRequired = Integer.parseInt(SmallList[jListWheelNumber.getMaxSelectionIndex()].substring(6,8));
int ValWinSize = Integer.parseInt(jtfNumbersMatch.getText());
int ValNosToMatch = Integer.parseInt(jtfNumbersAreCorrect.getText());
int NoOfLinesToCheck = Integer.parseInt(jtfTicketsRequired.getText());
int CountAll = 0;
int CheckOut = 0;
int CombTwice = 0;
int[] AllNo = new int[(ValNosRequired)];
int[] NoToCheck = new int[ValNosToMatch];
int[] Sequence = new int[ValNosToMatch];
int cntm = 0;
for ( int cntx = 0; cntx < UserNumbers.length()/3 ; cntx++ ) {
String subp = UserNumbers.substring(cntm,(cntm+2));
AllNo[cntx] = Integer.parseInt(subp);
cntm = cntm + 3;
}
do {
if (CountAll == 0) {
for(int cnt = 0 ; cnt < (ValNosToMatch); cnt++) {
Sequence[cnt] = cnt; }
}
else {
Sequence[ValNosToMatch-1]++;
int upwards = -1;
for ( int down=(ValNosToMatch-1); down > -1 ; down-- ) {
upwards++;
if (Sequence[down] == (ValNosRequired-upwards)) {
if (down > 0) {Sequence[down-1]++;}
}
}
for ( int up=0; up < (ValNosToMatch) ; up++ ) {
if (Sequence[up] == (ValNosRequired-ValNosToMatch+up+1)){
if (up >0 ) {Sequence[up] = Sequence[up-1]+1;}
else {Sequence[up]--;}
}
}
}
alllinecheck: for ( int lines=0; lines < NoOfLinesToCheck ; lines++){
int Matches = 0;
for ( int nm = 0; nm < (ValNosToMatch); nm++) {
LookingForMatch: for ( int intloop=0 ; intloop<6; intloop++){
if (AllNo[Sequence[nm]] == Integer.parseInt(CalLines[lines][intloop])) {
Matches++;
break LookingForMatch;
}
}
if ((Matches>(ValWinSize-1))&&(nm==(ValNosToMatch-1))) {
CheckOut++;
break alllinecheck;
}
else {
if((Matches<ValWinSize)&&(nm==(ValNosToMatch-1))&&(lines==NoOfLinesToCheck-1)){
OutputArea.append("Combination "+CountAll+" Failed");
for (int t=0 ; t<ValNosToMatch; t++) { OutputArea.append(" "+ AllNo[Sequence[t]]); }
OutputArea.append(System.getProperty("line.separator"));
}
}
}
}
CountAll++;
} while (Sequence[0] < (ValNosRequired - (ValNosToMatch)));
OutputArea.append("Checking Completed. Results Follow: "+System.getProperty("line.separator")+CountAll+ " Combination Checks with "+ CheckOut + " Passes.");
UpDateTextArea();
}
}

 


          botban.jpg (6064 bytes)