Computing Jumplane distance.

General discussion of the Victory by Any Means campaign system
Post Reply
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Computing Jumplane distance.

Post 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.

User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Computing Jumplane distance.

Post 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.

Post Reply