Search:

Type: Posts; User: CjStaal

Search: Search took 0.18 seconds.

  1. Replies
    19
    Views
    2,018

    Re: Problem with running random class

    You need to take the return out of your switch statment next -- it's ending the game when it gets to that.

    Now I'm getting
    Car Cricket Game
    ================
    Scoring: non...
  2. Replies
    19
    Views
    2,018

    Re: Problem with running random class

    Have you first corrected the error I've pointed out?

    What I'm getting

    Car Cricket Game
    ================
    Scoring: non white/black/red/green/yellow/blue/orange car: 0 runs.
    White/black car: 1...
  3. Replies
    19
    Views
    2,018

    Re: Problem with running random class

    you have a little bit of a misunderstanding on how do while loops work.
    Instead, take away the do and the semicolon at the end of the while
    Theres
    do{
    //code
    }while(this statement is still...
  4. Replies
    19
    Views
    2,018

    Re: Problem with running random class

    & try splitting it up, using a settings class -- will make the entire code a lot cleaner. Also, your doing a lot of weird stuff that you don't really need to in the code.
  5. Replies
    19
    Views
    2,018

    Re: Problem with running random class

    Take away the do and its brackets, and take away the semicolon from the end of the while loop.

    Should be this

    import java.util.*;
    import java.util.Random;

    public class AssigOne112
    {...
Results 1 to 5 of 5