Ugh. This solution is a bit ugly, even if I do understand the motivation.

My suggestion is to

a) make GUI class an interface.

b) use a mock/stub in the tests instead of the true GUI.

I think I can come up with a solution for this, but it requires a
minimum of effort. Will try to work on it on Saturday.

Ciao

PaoloB

On Fri, Aug 24, 2012 at 1:14 PM, Michael T. Pope <[email protected]> wrote:
> I am running a lot of automated tests to check that my AI `improvements'
> actually improve.  Speeding this up is worthwhile, so I made a brutal patch to
> make headless mode work again, which yielded a 20% speed up[1].
>
> The patch (attached) just informs the GUI object when headless mode is
> required, and prefixes every GUI use of canvas et al with "if (headless)
> return" or thereabouts.  Before committing though, I have to wonder if there
> is a better way of doing this.  Any thoughts folks, particularly Paolo:-).
>
> Cheers,
> Mike Pope
>
> [1] Further suggesting that we are spending a lot of time in I/O and XML
> converters.
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Freecol-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freecol-developers
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to