Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Re: [Help]

    Try working on a solution for a single row, not a 2 dimensional array. When that works, then you can easily modify the logic to look at all the rows and the columns.

    I gave you most of the logic...
  2. Re: [Help]

    A counter is how you know there are 3 in a row. You count them as you see them:
    first there is one, then if the next number matches the first there are two
    and then if the next number matches the...
  3. Re: [Help]

    Can you describe the logic for testing? Don't write any code until you have the logic.

    My question was for searching one row. That would be a one dimensional array. The code you posted used a...
  4. Re: [Help]

    I don't see how the posted method looks at the contents of a row and tests if there are 3 identical elements in sequence. It would need a loop to do that.

    Can you describe the logic to look at a...
  5. Re: [Help]

    Take it one step at a time.
    How would the code look at the items in a row to see if there are three in a row?
    Use a piece of paper, write some numbers in a row and work through the logic using...
  6. Re: [Help]

    How is that part of the problem of searching through an nxn grid looking for 3 in a row?
    First look at the rows then look at the columns for 3 in a row.
  7. Re: [Help]

    The posted method has three arguments passed to it. What are they supposed to be used for?
    It returns a 0 or a 1. What do they indicate?

    A thought: check the rows one by one for 3 in a row and...
  8. Re: [Help]

    Does the code have to look through all rows and columns in a 5x6 grid looking for any sequence of 3 numbers in a row or column (not diagonal) with the same value?
  9. Re: [Help]

    Can you describe what the code should be doing and the steps it should take to do it?

    Why is this test done: pos_x<2?

    How are the colors of the pieces determined?
Results 1 to 9 of 9