# Thread: online ROULETTE CALCULATER

1. Member
Join Date
Apr 2009
Posts
4
Rep Power
0

## online ROULETTE CALCULATER

I want to code my own online roulette calculater like roulette killer and roulette sniper.im still very new to javaso forgive me me for my errors!!
this is as far as i got,can any one help me?

on the roulette table some numbers are in 3 - 6 differnt sections ie. the number 28 is red , even ,2nd row ,so on and so on.would this be a problem and cause errors??

3.im still very new to java but would i use alot of " if " statment's for this program

(psudeo code)

if input = red ( + 1) and when red = 7 print ("bet on red now")

will i be able to apply all this to a gui interface?or should i just try code this in visual basic??

Java Code:
import java.util.scanner;

public class Roulette

{
public static void main (String [] args)
{
Scanner input = new Scanner (System.in);
//variables

int row1, row2, row3, first12, second12, third12, odd, even, red, black, oneto18, nineteento36, zero;

row1 = 0;
row2 = 0;
row3 = 0;
odd = 0;
even = 0;
first12 = 0;
second12 = 0;
third12 = 0;
black = 0;
red = 0;

system.out.println("enter numbers");

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

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

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

red == 1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 36, 34;

black == 2, 4, 6, 8, 11, 10, 13, 15, 17, 20, 24, 22, 26, 28, 29, 31, 33, 35;

oneto18 == 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18;

nineteento36 == 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36;

0;

}
}

any help would be great,cheers

2. Member
Join Date
Feb 2009
Posts
9
Rep Power
0
I'm sure you could apply this to a GUI interface, but unfortunately I don't know how it would be done.

Out of curiosity, do you really know some algorithm to detect when to bet, or are you just guessing? If you know a method I would love to help because I need to code a GUI for my final project in Java this year.

3. Firstly, that's not how you do arrays, or assignments. Check this out Trail: Learning the Java Language (The Java™ Tutorials)

Secondly, you don't need to check numbers against arrays. For evens you can use (x % 2 == 0), for first12 you can use (x <= 12) and so on.

Looks like you need to come up with some kind of data structure to represent which groupings a number is in. Maybe a bit field or a map of lists.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•