[Freeciv-Dev] [patch #1778] [interface] define the ai via the new interface

2010-07-29 Thread Matthias Pfafferodt

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

> 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!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1778] [interface] define the ai via the new interface

2010-07-29 Thread Marko Lindqvist

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

I don't have time to go in the details just now, but my plans go to quite
different way than this patch.

Anyway:
> * remove ./common/ai.c as it is empty

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

> * move call_incident() into a new file at ./server/advisors
> /advtools.c together with amortize()?

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.
Amortize() move makes sense, and is in my plans also.

> * merge ai.h and into interface.h?

What interface.h? Or do you mean aiinterface.h?
I'm not absolutely sure it would be bad idea in long term, but let's not do
it before we see how ai.[ch] develops.


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1778] [interface] define the ai via the new interface

2010-07-28 Thread Matthias Pfafferodt

Update of patch #1778 (project freeciv):

  Depends on: => patch #1732


___

Reply to this item at:

  

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1778] [interface] define the ai via the new interface

2010-07-28 Thread Matthias Pfafferodt

Update of patch #1778 (project freeciv):

  Depends on: => patch #1772


___

Reply to this item at:

  

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1778] [interface] define the ai via the new interface

2010-07-28 Thread Matthias Pfafferodt

URL:
  

 Summary: [interface] define the ai via the new interface
 Project: Freeciv
Submitted by: syntron
Submitted on: Mittwoch 28.07.2010 um 13:13
Category: general
Priority: 5 - Normal
  Status: Ready For Test
 Privacy: Public
 Assigned to: syntron
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.3.0

___

Details:

* remove ./common/ai.c as it is empty

* move call_incident() into a new file at ./server/advisors/advtools.c
together with amortize()?
* merge ai.h and into interface.h?



___

File Attachments:


---
Date: Mittwoch 28.07.2010 um 13:13  Name:
20100728-10-trunk-define-the-ai-via-the-new-interface.patch  Size: 25kB   By:
syntron



___

Reply to this item at:

  

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev