Thread: Roulette in Codeblocks 10.5

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    6

    Post Roulette in Codeblocks 10.5

    Can anyone help me how to make a simple roulette without graphics in C????I need some help because I am a begginner ..I am using Codeblocks 10.5 compiler.

  2. #2
    Registered User
    Join Date
    Dec 2010
    Posts
    6
    Please if anyone can help me how to make a simple roulette without hraphics because I have it in a school project...In the beggining of the roulette it must be entered the age from the user of this roulette...

  3. #3
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Ok, there's a standing rule here that we don't do people's homework for them.

    Give it a shot, make your best effort to solve it on your own...
    Then if you run into problems, pose your code (in code tags please) and I'm sure you'll get some help.

  4. #4
    Registered User
    Join Date
    Dec 2010
    Posts
    6
    I am not telling you to do my homework.I am only searching help!

  5. #5
    Registered User
    Join Date
    Dec 2010
    Posts
    6
    If noone helps me here where can i search for help????

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Do you know the rules? Roulette - Wikipedia, the free encyclopedia

    Perhaps 3 primary functions
    - placeBets()
    - spinWheel()
    - payout()
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #7
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Parid View Post
    I am not telling you to do my homework.I am only searching help!
    In that case it would help, rather a lot if you would ask an actual question...

    Seriously, be specific... what part of this are you stuck on?

  8. #8
    Registered User
    Join Date
    Dec 2010
    Posts
    6
    Since this is my first program and I am a very very beginner I would like to know how could I create a simple roulette without graphics.I am also trying to make a place where the user who uses the roulette types his age and it must be 18+ or he cant play roulette...

  9. #9
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Parid View Post
    Since this is my first program and I am a very very beginner I would like to know how could I create a simple roulette without graphics.I am also trying to make a place where the user who uses the roulette types his age and it must be 18+ or he cant play roulette...
    Ok... have you ever written a program, in any language, before?

    If not, you should start here...

    Cprogramming.com - C Made Easy

    This covers the very basic fundimentals of C programming and should get you off to a start with your project.

  10. #10
    Registered User
    Join Date
    Dec 2010
    Posts
    6
    I want to know which functions except the basic ones could help making a roulette??

  11. #11
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    C doesn't know or care about roulette, so there is nothing "this is good for implementing roulette" to tell you.

    What you get is a number of primitives you can put together in many different ways (including many different simulations of roulette).

    For example, spinning the wheel might involve calling rand()

    FWIW, this seems to be a hard problem for "your first program".
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  12. #12
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Parid View Post
    I want to know which functions except the basic ones could help making a roulette??
    Y'know what... my first program was "Hello World" which every C programmer should write. From there you add this, change that, learn new stuff... and eventually you find yourself writing more and more complex programs until, guess what... you've written something that's actually useful.

    There is no practical way to simply start to the top of the totem... there is always a climb involved.

    Roulette is actually a fairly simple program... essentially requiring some control loops, a spin the wheel procedure, some knowledge of the rules for scoring and some means to display results. There is nothing there that cannot be done with the C libraries and reserved words.

    So, I'd say you should settle down, learn the language --learn programming-- then tackle your project....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Giving CodeBlocks a shot
    By jeffcobb in forum Tech Board
    Replies: 24
    Last Post: 05-23-2010, 12:46 PM
  2. Help me with The Game of Roulette plzzzzzzz :(
    By dhruvgopal in forum Game Programming
    Replies: 2
    Last Post: 05-17-2010, 06:09 AM
  3. Code::Blocks Help
    By rakeshkool27 in forum C Programming
    Replies: 0
    Last Post: 01-16-2010, 08:25 AM
  4. library issues in CodeBlocks
    By everlearnin in forum C++ Programming
    Replies: 0
    Last Post: 06-02-2009, 08:44 PM
  5. Codeblocks crashes linux?
    By Shakti in forum Tech Board
    Replies: 1
    Last Post: 03-25-2009, 07:26 AM