• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help!!

 
hoa tranh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help...
i'm trying to build this class cat program but i do not know how to make the cat walks and jumps. For example, a cat is sitting in a room with 20 units wide, 30 units long, and 10 units height. Within this room, a cat cannot walk or jump exceed -10 to +10 width, and -15 to +15 in length, and 0 to +10 height. A cat is at center of the room at (0,0,0) where the first value (0) is for width and second is for length and thrid number is for distance above the floor. How do I make my cat to walk from this starting point (0,0,0) to let's say (4,6,0) or jump (1,0,4), not high above 4 units at a time, to the new location of (5,6,4). In desperate need of helppp.......thanx
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow! This is one strange program.
Ok lets start with a "cat" class. The class tells us where the cat is, the max distance the cat can travel, and accepts a request to move the cat. Some sudo-code (sudo means that you have to fix it up to get it to work.)

I didn't put anything in there to check for the maximum movement. But maybe this will get you started in the right direction.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic