Re: [Freeciv-Dev] OOP developement

Raimar Falke <rf13-r/[email protected]> Thu, 23 Jan 2003 09:35:17 +0100
Newsgroups gmane.games.freeciv.java,gmane.games.freeciv.devel
Message-ID <[email protected]>
On Wed, Jan 22, 2003 at 08:08:21PM -0800, Bryon Lape wrote:
> I am attempting to make a .Net port of FreeCiv using
> C#.  I was wondering if those who have done OO ports
> such as Java make more or less a direct translation of
> the C code or do they map out the functionality and
> use a more OO approach?  I had first thought of making
> UML diagrams for the functionality as well.  Does this
> already exist somewhere?

[ I didn't develop on any OO version of freeciv. ]

Problems I see with a more "normal" OO development is that you may
have problems classifying the functions which are in
common/*. Example (from common/city.h):

  bool is_friendly_city_near(struct player *owner, int x, int y);

Shouldn't this function be moved to Map or Player?

However if you solve this you will have a clearer interface
afterwards.

Also note that if you start with a client you have less C code to
copy. If you develop a server you have to copy (transform it 1:1) a
lot of C code to comply with the "offical" server. With a client you
only have to share the network interface and some constants.

	Raimar

-- 
 email: rf13-r/[email protected]
 "Of course, someone who knows more about this will correct me if I'm
  wrong, and someone who knows less will correct me if I'm right."
    -- David Palmer ([email protected])