URL:
<http://gna.org/patch/?1942>
Summary: refactor first portion of ai_airlift into
find_neediest_airlift_city
Project: Freeciv
Submitted by: nixeagle
Submitted on: Thursday 09/09/2010 at 03:58
Category: ai
Priority: 1 - Later
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release:
_______________________________________________________
Details:
New function combines original two loops into one loop and returns the city
with the greatest need of an airlift.
Resulting code does the same exact thing as before, but reading and
understanding what the code does is much easier for this one portion of the
function.
-- Above is the commit summery I made to my local git repository.
A little more detail, this is my first ever patch to this project. I'm
interested in hacking on and improving the game ai portions. To start I
thought I'd start reading through the code and fixing up what I can while I
work on groking the code base.
Please note that this patch is not strongly tested. I've checked that it does
not obviously break the ai, but I'm not setup yet for proper regression tests.
I will be by this weekend.
I've tried my best to adhere to the coding standards. However I don't yet
have a project specific emacs configuration, so please poke me if something
is not quite right.
Finally while I know the coding style wants no variable initializations at
the same time as the declarations... I'm really not sure how that is to be
done in find_neediest_airlift_city, and I see some other areas disregard this
particular rule. I'm all ears though :).
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thursday 09/09/2010 at 03:58 Name:
0001-refactor-first-portion-of-ai_airlift-into-find_needi.patch Size: 3kB
By: nixeagle
simple refactor.
<http://gna.org/patch/download.php?file_id=10260>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1942>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev