[gcompris-devel] Would like to extend the Chess MoveLearn sub-application for Sugar OLPC : how is architectured GCompris ?

Bruno Coudoin bruno.coudoin at gcompris.net
Sun Jun 30 17:25:00 UTC 2013


Le 30/06/2013 19:12, laurent bernabe a écrit :
>> Concerning the chess code, we are driving gnuchess in the backend
>> through a text based interface. This is not as reliable as an API and
>> thus any changes in the output breaks GCompris. This is why I ended up
>> including and distributing a version of gnuchess that we support.
>>
>> For having a version without a king, this is not possible to do this
>> with gnuchess. For sure a chess engine without a king would not know
>> what to do.
>>
> *) You're right : I did not thought about the fact that a chess engine in
> most cases need both kings in order to compute things on a given position.
>
> A workaround can be trying to write my own very little chess engine (rather
> in Python, and rather a chess move validator), therefore I should create a
> new activity for a kind MoveQuizz, and not try extending Chess MoveLearn.
>
> Because Chess MoveLearn is based on GnuChess and that its board is written
> in C language.
Yes, the chess activity was written before we had the python plugin.

>
> *) I saw in the lightsoff activity, written in Python, that we can use the
>
> _________________________________________
> gcompris.utils.load_svg(path) method
> ____________________________________________
>
> and also the constructor
>
> __________________________________________
>   goocanvas.Svg(...)
> _____________________________________________
>
> but neither is documented in the GCompris Python api page nor the goocanvas
> python api page.
>
> So where can I learn more ?
>
I am afraid you will have to read the code and look at other activities 
to see their use. I extended the goocanvas to include an svg item. This 
is why it is not documented in the official goocanvas documentation.

Bruno.





More information about the Gcompris-devel mailing list