Results 1 to 2 of 2
  1. #1
    Hector is offline Member
    Join Date
    Feb 2014
    Location
    Seattle, Washington
    Posts
    9
    Rep Power
    0

    Default GridWorld BinaryBug Program Help

    Design and implement a new bug that will extend the bug class. This bug will be called “BinaryBug”. The way this bug will work is that each time that it steps towards a direction it will be considered a 0 in a string of binary numbers. Whenever it runs into another bug or flower it is going to hop over the bug and that will add a 1 to the string on numbers. If there are multiple objects in a row that need to be hopped over, the binary bug will have the ability to do so. When the binary bug reaches the end of a bounded grid, or reaches a rock, it will display the string of the binary number. It will then turn to a direction in which it is free to move and start over. If the bug runs into an object that it needs to jump over, but the jump would put it off the grid, then it will also finish its path.

    This program is giving me some trouble and i need to know where to get started. i feel like i should try to use the getNeighbors or getOccupiedAdjacentLocations methods to check for the spaces around it to make sure the binary bug doesnt have to jump over another object on the grid.
    Thanks in advance for any help!

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,578
    Rep Power
    25

    Default Re: GridWorld BinaryBug Program Help

    What have you tried?
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Help with Critter in Gridworld?
    By Estrex in forum New To Java
    Replies: 0
    Last Post: 03-28-2013, 09:54 AM
  2. URGENT: Quick rundown on GridWorld?
    By Green_Ghoul in forum New To Java
    Replies: 2
    Last Post: 05-03-2011, 02:00 AM
  3. help with gridworld?
    By Samirjthe2nd in forum New To Java
    Replies: 1
    Last Post: 04-28-2011, 10:10 PM
  4. Object Construction ends Program in GridWorld
    By BJ1110 in forum Advanced Java
    Replies: 9
    Last Post: 02-04-2011, 04:02 PM
  5. Need gridworld help
    By robertbob in forum New To Java
    Replies: 2
    Last Post: 05-03-2010, 05:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •