Follow-up Comment #2, patch #1778 (project freeciv):

> What interface.h? Or do you mean aiinterface.h? 

I did define a general interface for functions with different content for the
client and the server in patch #1772. This patch uses it for the ai

> Empty? What about get_ai_type() and init_ai(). Also, more
> stuff is coming to it. 

Based on patch #1772 this one takes care of these functions. They are defined
as function pointers and only really needed in the server. Thus, they can be
moved into aiiface.(c|h). The client has dummy functions at the moment.

> Advisors directory should contain only stuff that helps
> players, and call_incident() is not such a function. I'm also
> going to rewrite call_incident() soon. 

OK, so it should stay into aiiface.c. This is the file for the interface
between the server and all AI code. 

My idea is to separate the ai code and the server code. At the end, the
server should only call function pointers from player->ai. One rule would be,
that the server only includes aiiface.h which provides the function pointers.

The code in ./ai should be split into general code (helps the players) which
goes into ./server/advisors and real ai code which stays in ./ai and is
accessed via ./server/aiiface.c.


Reply to this item at:


  Nachricht geschickt von/durch Gna!

Freeciv-dev mailing list

Reply via email to