Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: [PATCH2] Re: AI questions

[Freeciv-Dev] Re: [PATCH2] Re: AI questions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Raahul Kumar <raahul_da_man@xxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH2] Re: AI questions
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Sun, 25 Nov 2001 15:00:27 +0100

> > So this becames:
> > 
> >    for (id = 0; id < game.num_impr_types; id++) {
> >      if((!is_wonder(id)) && improvement_types[id].upkeep)
>       if((can_sell_building(pcity, id) && improvement_types[id].upkeep)
> /* rather? We have to check also if it's even already built ;) */
I got what you meant
      if((!is_wonder(id)) && !improvement_types[id].upkeep)
didn't you?
> >      {
> >         if(id!=B_CITY && id!=B_PALACE)
> >            freelog(LOG_NORMAL,"%d",id);
> >      }
> > 
> > Can you test this?
> Obviously I can.
31,32,33,67 - what I wrote :-).
>                  Anyway, I ran into some weird problems, ending with my test
> game around 1760, then it abort()s it seems. I suspect it has nothing to do
> with my changes however, I will investigate it too.
Lalala, that was Game over :-). Just nothing obvious appeared at gamelog and
terminal was left in weird state. Attached two patches, first one logs game
over, second one restores terminal correctly. There is a question, how to quit
the server. It would be maybe most correct to do it via quit_game(), like in
the rest of server code, otherwise we will end up with things like broken
terminal. Or add close_connections_and_socket() call minimally, to shutdown
readline correctly.


                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC
Real Users hate Real Programmers.
Public PGP key, geekcode and stuff:

Attachment: gameover-gamelog.diff
Description: Text document

Attachment: gameover-quit.diff
Description: Text document

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