Complete.Org: Mailing Lists: Archives: freeciv-ai: August 2004:
[freeciv-ai] correctly evaluate ocean dangers
Home

[freeciv-ai] correctly evaluate ocean dangers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] correctly evaluate ocean dangers
From: Per Inge Mathisen <per@xxxxxxxxxxx>
Date: Mon, 16 Aug 2004 16:46:09 +0000 (GMT)

Now that Greg has so lovingly granted us ocean numbers, we can correctly
check if we need to preemptively build that Coastal Fortress.

Patch attached:
 - checks for dangers in correct oceans
 - no longer considers empty cities "explore-worthy"
 - new aidata variable keeps track of which oceans are still not
   fully explored (not currently used; maybe it should be an int
   of how many tiles remain out of how many total?); similar to
   the land-based variable that does the same for land, also
   unused...
 - stop worrying twice whether we can build anti-unit-buildings;
   it hardly saves any CPU cycles, and might just spend more doing those
   checks. also plays nicer with general effects.

Not really tested yet. Comments?

I thought about adding ocean check to goto_is_sane(), but problem is we
might have a canal in a city. So I thought about making an aidata matrix
of canals that exist, but then I wondered if that was really worth the
trouble...

  - Per

Attachment: oceandanger1.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]