Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] (PR#9006) player_in_territory() function
Home

[Freeciv-Dev] (PR#9006) player_in_territory() function

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9006) player_in_territory() function
From: "James Canete" <use_less@xxxxxxxxxxx>
Date: Wed, 16 Jun 2004 16:35:02 -0700
Reply-to: rt@xxxxxxxxxxx

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

This patch implements a function called player_in_territory(), which
returns the number of visible units pplayer2 has in pplayer's territory.

Along with this I have included a separate example patch which makes AI
diplomacy use this function to calculate the amount of love lost per
turn during wartime.

Issues:
-Should this function be in player.c?
-There's probably a more efficient way to do this.
-Compiler warning because can_player_see_unit() doesn't use "const
struct player *".

TODO:
-Use this as a base to introduce right of passage treaties and forced
expulsion of another civ's units.

-James Canete

Attachment: aidip_territory_tweak.diff
Description: Binary data

Attachment: player_in_territory.diff
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#9006) player_in_territory() function, James Canete <=