[freeciv-ai] (PR#10239) production leader
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[freeciv-ai] (PR#10239) production leader |
From: |
"Mateusz Stefek" <mstefek@xxxxxxxxx> |
Date: |
Tue, 21 Sep 2004 09:58:50 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10239 >
This patch adds production leader concept into AI code.
It is intended to be used in Appolo evaluation code.
--
mateusz
Index: aidata.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aidata.h,v
retrieving revision 1.17
diff -u -r1.17 aidata.h
--- aidata.h 13 Sep 2004 15:54:49 -0000 1.17
+++ aidata.h 21 Sep 2004 16:58:19 -0000
@@ -75,6 +75,7 @@
int req_love_for_ceasefire;
struct player *alliance_leader; /* Who is leading our alliance */
struct player *spacerace_leader; /* who is leading the space pack */
+ struct player *production_leader;
} diplomacy;
/* Long-term threats, not to be confused with short-term danger */
Index: aidata.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aidata.c,v
retrieving revision 1.41
diff -u -r1.41 aidata.c
--- aidata.c 20 Sep 2004 20:05:50 -0000 1.41
+++ aidata.c 21 Sep 2004 16:58:20 -0000
@@ -347,6 +347,14 @@
ai->diplomacy.alliance_leader = ally_strongest;
}
ai->diplomacy.spacerace_leader = player_leading_spacerace();
+
+ ai->diplomacy.production_leader = NULL;
+ players_iterate(aplayer) {
+ if (ai->diplomacy.production_leader == NULL
+ || ai->diplomacy.production_leader->score.mfg < aplayer->score.mfg) {
+ ai->diplomacy.production_leader = aplayer;
+ }
+ } players_iterate_end;
/*** Priorities ***/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freeciv-ai] (PR#10239) production leader,
Mateusz Stefek <=
|
|