Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#9824) problems with counting adjacent tiles in hex
Home

[Freeciv-Dev] Re: (PR#9824) problems with counting adjacent tiles in hex

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#9824) problems with counting adjacent tiles in hex topologies
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 29 Aug 2004 22:10:53 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9824 >

Marcelo Burda wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9824 >
> 
>>[jdorje - Jeu. Aoû. 26 21:03:53 2004]:
>>
>>Several places count the number of tiles adjacent to a current tile:
>>
>>- When transforming ocean<->land.
>>- When calculating borders.
>>- Who knows where else?
>>
>>Obviously this won't work very well with hex topologies.
>>
>>My solution would be to turn these values into percentages rather than 
>>total values.

> 
> This has a big problem, if you see for  condition (count == all - 1),
> you need count and all, for square topolgy this is 700/8 % and for hex
> 500/6, imposible to handle easyly, At last you has to provaide the old
> system and a NUMBER_ADJC_TILES for these things.

I changed all the users and there was only one that needed an absolute 
amount.  River generation checks if more than one adjacent tile contains 
a river, to prevent river loops.  This check shouldn't be a percentage.

> provide the old and new _pct function and NUMBER_ADJC_TILES.
> and be carrefully where you change something to % and where you has to
> user numbers.

Yeah, probably so.

jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#9824) problems with counting adjacent tiles in hex topologies, Jason Short <=