how do i solve this problem?

This is a discussion on how do i solve this problem? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Oh yeah, bummer. I forgot about that. Still, while mindlessly writing out the array content I realised that it probably ...

  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.
    Attached Files Attached Files

Page 3 of 3 FirstFirst 123
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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21