GSoC/GCI Archive
Google Code-in 2011 Tux4Kids

Make mathcards thread-safe to allow multiple instances of question lists

completed by: povik

mentors: sids.aquarius, Deepak , David Bruce

TuxMath's question lists are created in mathcards.c/h. However, as currently implemented there can only be a single instance of mathcards running, which makes it impossible for the server to handle multiple games in the LAN version. For this task, make mathcards "thread-safe" so that multiple instances can safely run. Hint - each instance should have all its variables encapsulated within a struct, and the mathcards functions used by the game will need another argument to identify the correct mathcards instance. (Perhaps this task is "really hard")