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: Gregory.Berkolaiko@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#9637) Ocean numbers
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 8 Aug 2004 15:22:02 -0700
Reply-to: rt@xxxxxxxxxxx

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

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

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.

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

4.  I'm not sure your assign_continent_numbers logic is good.  Is it 
possible the continents would not changed but the continents would be 
renumbered?  Probably not but this depends on the internals of code 
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().

jason




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