Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007)
Home

[Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>, "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Fri, 2 Nov 2001 15:06:33 +0000 (GMT)

 --- Raahul Kumar <raahul_da_man@xxxxxxxxx> wrote: > 
> --- Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> wrote:
[..]
> > However I found a bug in my _dynamical_ warmap generation which might
> > force me to abandon this particular convention.  The problem is that
> a
> > shore tile would never be returned although it's move_cost still
> > computed.
> > 
> 
> What are you going with instead of the current -3 convention? 

My plan is to introduce a parameter warmap.sea_to_land which will be
returned instead of -3.  The default value would be MAXCOST (thus
forbidding such movement).  But if warmap is generated for , say, a
transport carrying engineer to build a new city, the cost would be
SINGLE_MOVE.
However the user would have to insure that he doesn't process a land
tile.

Another way is to always return SINGLE_MOVE and to amend
warmap_process_tile to check for the sanity of the proposed tile.

However the best way would be to split move_cost into sea and land costs
and set land-to-anything sea_move_cost to be MAXCOST, thus avoiding the
need to check for sane tile...

Suggestions and constructive criticism are welcome.

G.


____________________________________________________________
Nokia Game is on again. 
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.


[Prev in Thread] Current Thread [Next in Thread]