This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes GridWorld Help (Bug go in Z) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "GridWorld Help (Bug go in Z)" Watch "GridWorld Help (Bug go in Z)" New topic

GridWorld Help (Bug go in Z)

Jim Tseng

Joined: Nov 15, 2007
Posts: 1
I need help with making a bug go in a "Z" shape and then stopping. The bug should stop completely if any obstacle is put in its way however. This is something for school and I really don't get it very well.

The person sitting by me in class said that I was making this really complicated and I was wondering if someone can help correct this.
We use JCreator 3.5 and the workspace is called GridWorld( I can email the files to you if necessary.

here's my lab
ZBug Lab Instruction

here's my current code

Thanks for the help!
[ November 15, 2007: Message edited by: Jim Tseng ]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: GridWorld Help (Bug go in Z)