Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    There is something messed up in the way this project is configured in the IDE. I've never seen the error message that is being posted. The error message doesn't correspond to the posted source code....
  2. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    You posted the enum definition in post#3. Did you ever use it in any of the code after that without any problems? If it did work for some classes since post #3, what has changed since then?
  3. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    try Direction.EAST
  4. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    Sorry, I can't connect that post with any code. Where is the code causing the error?

    Copy the full text of the error messages and paste it here.
  5. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    Please explain. Copy the full text of the error messages and paste it here.
  6. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    Ant is not coded correctly now. That should be fixed.
  7. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    Change the code to return the correct value vs EAST.

    Suggestion: add a main() method for testing the constructor and methods. Create an instance of the Ant class, call its methods and print out...
  8. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    The question was, how did code in post#21 work without an error when it referenced EAST.
  9. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    If EAST worked in post#21, what is different in the code in post#22.

    What should the getDirection() method return? Why always EAST?

    Suggestion: add a main() method for testing the...
  10. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    Do it where the execution starts, like in the constructor.

    Do you live south of the equator and orient your maps with the South pole at the top?
  11. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    The case statements should update the current position. What's coded in the case statements doesn't change the current row. The moves should change the current position by 1 in the appropriate...
  12. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    You can't always use the start position to determine the next position. You need to use the current position.

    int antrow=antStartI+1;
    The current position variables need to be defined at the...
  13. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    Those variables name have "Start" in them which could mean that they are the initial values and would not be used to keep track of the ant's current location which could be kept in variables: antRow...
  14. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    What is the current problem you are working on? Ask a specific question.
    Have you done any analysis of the problem and written a list of the steps the program needs to do to solve the problem? What...
  15. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    I assume the ant is located in a square at a row and column in an array.
    I was asking what squares are adjacent to a given square? Just the 4 that are above, right, below and left of the current...
  16. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    Is the ant in a 2 dim array of sqaures?
    Would a move be to an adjacent square?
    Would there be 4 possible squares to move to (barring a current location at an edge which would reduce the possible...
  17. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    What are your problems with the posted code? Do you have any specific questions?
  18. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    Ok, now what should the program do?
  19. Thread: Lagnton Ant

    by Norm
    Replies
    41
    Views
    4,399

    [SOLVED] Re: Lagnton Ant

    Can you explain? What is its position: x,y?
    What is its direction: north, east, south, west?
    For example: If the ant is at x,y and it is facing east, what should happen?
Results 1 to 19 of 19