Complete.Org: Mailing Lists: Archives: freeciv-dev: October 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>
Cc: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, rf13@xxxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007)
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Fri, 19 Oct 2001 20:58:32 -0400

Actually I think Gregory had it right and if one followed your comments 
it is liable to confuse the situation far more in the future.

Think of it this way:

1) There is a move_cost associated with a move, in this case SINGLE_MOVE.

2) You need to compute the cost to move there (i.e. to attack) but you
   are not allowed to move there, or through there to another tile.

The convention in the warmap generation is that move_costs are always
positive, and if you get a negative one it means something special, 
i.e. case 2 above. There are only a very few special case interactions
like this in warmap generation. Learn them, don't come up with ways to
hide them.

This is NOT a special move, it is a regular move that invokes a warmap 
special convention.

So you need to indicate clearly that it is a "negative" move_cost so
people will understand.

Cheers,
RossW
=====

Aside: about city warmaps ... haven't a clue. But if I spot something
       I'll pass it on. If I guessed, it would be something to help them
       plan settler improvements, or rather building a settler to go do
       some improving, maybe building a trireme to transport a city
       founder, or building an attack unit to "find_something_to_kill()".
       It mmight even be used in estimating city_danger, i.e. how far
       away is an enemy. There are lots of comments about warmaps being
       munged, or created, as a side effect of previous operations in 
       code in server/settler.c or ai/adv*.c

At 12:28 AM 01/10/17 -0700, Raahul Kumar wrote:
>
>--- Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> wrote:
>>  --- Raahul Kumar <raahul_da_man@xxxxxxxxx> wrote: 
>> > return -SINGLE_MOVE
>> > 
>> > No, no,no. Bad Berkolaiko, Bad! Do not return a negative single move
>> > cost, this
>> > is part of the reason I used to believe there was a relation between
>> > single
>> > move cost and the sea move cost.
>> > 
>> > return SEA_MOVE_COST would be better.
>> 
>> well, this is similar to the use of SEA_MOVE_COST but in actual fact it
>> is completely opposite.  returning negative movecost is to signal that
>> routes must not pass through the tile and, at the same time, provide the
>> movecost
>> for _ending_ the route here.
>>
>
>The above should be a comment, and it is still a bad thing to return
>-SINGLE_MOVE. Call it something like
>
>EVIL_TWIN_OF_SEA_MOVE_COST
>
>Of course, if you can think of a funnier variable name ...




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