Search:

Type: Posts; User: connorlm3

Search: Search took 0.09 seconds.

  1. Replies
    15
    Views
    1,808

    Re: Mastermind Game, Function problem?

    Ok, i changed it to where its updating the entry into guess
    still not working though. >.< it isnt exiting the while loop? even when guess and nCode match. So am I using the .equals method wrong?
    ...
  2. Replies
    15
    Views
    1,808

    Re: Mastermind Game, Function problem?

    Heres current version:



    package mat2670;

    import java.util.*;

    public class Mastermind {
  3. Replies
    15
    Views
    1,808

    Re: Mastermind Game, Function problem?

    But, program still isnt working right.

    --- Update ---



    Choose the length of the number you will be trying to guess:
    2
    Enter your guess:
    12
  4. Replies
    15
    Views
    1,808

    Re: Mastermind Game, Function problem?

    How many digits is determined by the user. i tried changing to loop to go from i = n; i > 0; i-- but it was giving me index out of bounds exceptions

    --- Update ---

    I got it, changed loop to...
  5. Replies
    15
    Views
    1,808

    Re: Mastermind Game, Function problem?

    Thanks for that, and no. it doesnt :( lol it prints it out backwards. need it to have 1,2,3,4 if the user enters 1234


    Enter your guess:
    1234
    Guess Array Contains [4, 3, 2, 1]
  6. Replies
    15
    Views
    1,808

    Re: Mastermind Game, Function problem?

    Kind of, but im taking an int in from the scanner. I wasnt thinking about how it would act at first. If a user entered in 1234, that would be the array would only have 1 number in it at array[0],...
  7. Replies
    15
    Views
    1,808

    Re: Mastermind Game, Function problem?

    the values of which variables? the rightspot wrongspot or the numbers in the arrays?

    --- Update ---

    whoah, why would i be getting this? I added print statements after my if-else-if to print...
  8. Replies
    15
    Views
    1,808

    Mastermind Game, Function problem?

    Im required to make a variation ot the mastermind game. The program uses random numbers to generate a n-digit number. The user chooses the length of the number, n. The user should be allowed to make...
Results 1 to 8 of 8