Page 1 of 1

Computing Jumplane distance.

Posted: Tue Jan 06, 2015 11:40 pm
by OneMadOgre
I'll eventually figure this out, but I'm lazy and thought I'd try crowdsourcing it.

I have some database tables for the web play aid. Here's what part of the entities look like

Code: Select all

public class Starsystem 
{
    public int starsystemid
    public string starsystemname
}

public class Jumplane 
{
    public int jumplaneid
    public decimal jumpcost
    public virtual Starsystem starsystem1
    public virtual Starsystem starsystem2
}

I'm looking for a linq type query (although I could I suppose get it from a Sproc too) that would let me compute the min jump distance between any two star systems.

My hair is pointy after doing powerpoint presentations for the last decade or so and only being a hobbyist developer. Help an old man out.

Re: Computing Jumplane distance.

Posted: Fri Jan 23, 2015 12:40 pm
by OneMadOgre
I know you were all on the edge of your seats. :) I found a way to do this in an AI book. Implementation slower now that I burned off all of my vacation last year.