Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#6174) Loading transports
Home

[Freeciv-Dev] Re: (PR#6174) Loading transports

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6174) Loading transports
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Feb 2004 13:23:06 -0800
Reply-to: rt@xxxxxxxxxxx

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

Per I. Mathisen wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=6174 >
> 
> On Wed, 18 Feb 2004, Jason Short wrote:
> 
>><URL: http://rt.freeciv.org/Ticket/Display.html?id=6174 >
> 
> 
> I suggest renaming
> 
> can_unit_exist_at_tile_without_transporter -> tile_is_legal
> can_unit_survive_at_tile_without_transporter -> tile_has_fuel

Really?  That seems not to be very explanatory, especially since these 
are unit functions not tile functions.

A shorter function name would be nice.  But these functions are only 
used in a few places so readibility is more important than writability. 
  If they're absolutely too long I'd suggest

   can_unit_exist_at_tile
   can_unit_survive_at_tile

although even this may lead to confusion (the unit CAN exist, just not 
without a transporter...).

Also note that for units that have no fuel requirements, tile_has_fuel 
would always return TRUE.  Seems wrong.

That said, I don't care that much about the function naming.  Compared 
to the existing names I don't think we can really do wrong.

jason




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