AI discussion, ideas, and SDK help.
-
SunTzu
- Lux Cartographer
- Posts: 1586
- Joined: Sat Jan 14, 2006 1:48 am
- Location: Maryland
Post
by SunTzu » Tue Jul 10, 2007 12:35 am
Is there a way to get the countries a player owns at the start of the game? It seems I can only get the countries at the start of a player's first turn.
-
dustin
- Lux Creator
- Posts: 10998
- Joined: Thu May 15, 2003 2:01 am
- Location: Cascadia
-
Contact:
Post
by dustin » Tue Jul 10, 2007 12:52 am
The message(...) method will get called when you're attacked. So I would put a check both in there and in your first turn, check the countries on whichever gets hit first.
-
SunTzu
- Lux Cartographer
- Posts: 1586
- Joined: Sat Jan 14, 2006 1:48 am
- Location: Maryland
Post
by SunTzu » Wed Jul 11, 2007 4:27 pm
I actually found an easier way...
setPrefs() is called before any moves are made, and you can get the initial board conditions then.
-
Bertrand
- Reaper Creator
- Posts: 568
- Joined: Mon Nov 28, 2005 4:35 pm
- Location: Montreal
Post
by Bertrand » Wed Jul 11, 2007 6:57 pm
I'm not sure that the countries have been assigned when setPrefs() is called, for example in selected countries games.
-
SunTzu
- Lux Cartographer
- Posts: 1586
- Joined: Sat Jan 14, 2006 1:48 am
- Location: Maryland
Post
by SunTzu » Thu Jul 12, 2007 1:35 am
I see what you mean Bertrand...
Right now, though, I'm just building this for starting scenarios. I'll come back to that once I have the bot up & running.
Users browsing this forum: No registered users and 51 guests