Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)
Home

[Freeciv-Dev] [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Sun, 3 Mar 2002 06:25:02 -0800 (PST)

Hello,

  so, now I'm trying my luck with getting something slightly larger and more
complicated into CVS - this cleanup cleans proccess_(defender|attacker)_want()
functions, corrects TODO appropriatelly, and renames pcity->ai.(f|a) into
something more descriptive. Behaviour is not changed (autogames are same). Oh,
yes, and it seems to me that it compiles.

  I think it's ready to actually go in, altough I'm open to objections and
ideas how to extend/correct it even more (I expect many hints for better and
more comments, and possibly also for better variable names - in fact, all those
one-letter variables have usually same mean in the whole AI - but I didn't i.e.
renamed f to 'loss', but to 'bcost' here, contrary to findvictim()).

  The patch is already large enough now, so no, I won't cleanup anything else
there - I touch several other functions when renaming those pcity->ai.vars, but
I'm not going to rename anything else there.

  Oh, I want to ask for a long time already, but now finally I remembered ;).
It seems to me that unit_vulnerability() (and assess_danger_unit() etc) are
returning _higher_ values for _less_ vulnerability (as the defense rate is
taken as a base) - isn't their name a bit confusing then?

  Ah, note that this patch is obviously only sixth in very long line. And as
I'm modifying more files at once now, I'm counting revisions of the patch from
1.1.

  Enjoy your reviewing ;),

-- 

                                Petr "Pasky" Baudis

* elinks maintainer                * IPv6 guy (XS26 co-coordinator)
* IRCnet operator                  * FreeCiv AI hacker
.
"If you have acquired knowledge, what do you lack?
    If you lack knowledge, what have you acquired?"
Lev. R. 1:6
.
Public PGP key && geekcode && homepage: http://pasky.ji.cz/~pasky/

Attachment: want.patch
Description: Text document


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