Thread: how do i solve this problem?

  1. #31
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Oh yeah, bummer. I forgot about that. Still, while mindlessly writing out the array content I realised that it probably wouldent be to hard to get adjacent tile as there are 6 sides and 6 corners thats only 12 cases to deal with. Anyway, at least it works on a small scale.

  2. #32
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Ok, I came up with a version that can work with any co-ords (in an int). I also fixed a bug that occasionally caused the path to take one step more than necessary. Its kind of dumb of me but I completely misinterpreted the task. For some reason I thought it had to print out the steps along the path to get to the target o_O. Anyway this does that as well as finding the move cost. Took me a long time, lol.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Solve This Problem Within 3 Hr Urgent Need
    By annum in forum C Programming
    Replies: 12
    Last Post: 10-04-2009, 09:56 AM
  2. problem solve
    By coolnarugodas in forum C Programming
    Replies: 7
    Last Post: 04-26-2005, 12:31 PM
  3. Replies: 2
    Last Post: 04-25-2005, 11:59 AM
  4. Bubble Sort / selection problem
    By Drew in forum C++ Programming
    Replies: 7
    Last Post: 08-26-2003, 03:23 PM
  5. problem cant solve please help.
    By sarah in forum C Programming
    Replies: 6
    Last Post: 09-03-2001, 01:32 PM