Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#9637) Ocean numbers
Home

[Freeciv-Dev] Re: (PR#9637) Ocean numbers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#9637) Ocean numbers
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxxx>
Date: Mon, 9 Aug 2004 03:27:09 -0700
Reply-to: rt@xxxxxxxxxxx

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

On Sun, 8 Aug 2004, Jason Short wrote:

> 1. Seems like you should have just one whole_map_iterate in
> assign_continent_flood().  (Well, two whole_map_iterates in total...you
> don't need to add a new one.)

ok

> 2. This code:
>
> +  if ((is_land && is_ocean(map_get_terrain(x, y)))
> +      || (!is_land && !is_ocean(map_get_terrain(x, y)))) {
>
> isn't very efficient since map_get_terrain() is called twice.  But maybe
> you don't care.

it isn't called twice, because is_land cannot be TRUE and FALSE at the
same time.

> 3.  What happens if the number of continents or oceans wraps around?
> Big bugs, and no way to catch them.

what do you mean wraps around?  num_cont or num_oceans >= SHRT_MAX?
which is 32 thousand?

> 4.  I'm not sure your assign_continent_numbers logic is good.  Is it

you mean  check_continent_change?

> possible the continents would not changed but the continents would be
> renumbered?  Probably not but this depends on the internals of code

this is possible, but the numberings must start diverging around the
changed point.

> elsewhere.  Seems like your original idea (to always renumber) is safer.
>   send_all_known_tiles shouldn't have much overhead because of delta.
> But I don't know about allot_island_improvs().

yes, it is safer.
I rather like my check_continent_change logic, but I don't mind.

G.




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