On Thu, 3 Jan 2013 10:01:40 AM Michael T. Pope wrote:
>[Strageness with matchesNull and getModifierSet]
> The more I look at this one the more worrying it looks.  Pretty much
> anything involving modifiers ends up in that routine, and I really like
> being able to trust that the spec means what it says.  I will have a closer
> look at this soon.

Ah.  I have convinced myself the test suite was in error.

Tile.potential(grain, null) was indeed incorrectly including the bonus marked 
with matchesNull=false.  I have fixed the broken test, added a test that calls 
Tile.potential(grain, expertFarmer) which correctly does pick up that bonus,
and removed the null-object-accepts-all-modifiers code in getModifierSet 
(svn.10436).

This remains a scary fundamental change, but there are four current instances 
of matchesNull=false in the spec, for the expert farmer and fisherman on bonus 
resources, which appear to still be working correctly.

Cheers,
Mike Pope


Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to