https://bugs.kde.org/show_bug.cgi?id=478808
--- Comment #5 from Jazeix Johnny <jaz...@gmail.com> --- (In reply to lcerf from comment #4) > (In reply to Jazeix Johnny from comment #3) > > You're right, then let's implement it the correct way :) > > I do not really want to look at the existing code (you certainly know how > long it usually takes to enter a code you have not written). Anyway, if a > feedback at level 1-4 is stored in a std::vector<Key_peg> (where Key_peg is > an enum, with three values, for black, white and nothing) of size the number > of pegs in the code (3 at level 1, 4 at level 2, etc.), then the same could > be done for the harder levels. A mere function could take such a feedback > and return a std::pair<unsigned int, unsigned int>: how many black pegs and > how many white pegs. It would simply iterate over the vector and, at each > iteration, increment the proper counter or none (for the nothing Key_peg). > If a feedback at level 1-4 is *not* stored in a std::vector<Key_peg>, well, > maybe doing so would be "the correct way". :-) No worry, we'll take a look :). We plan to fix it for the next version we should do in February. The function to fix is probably https://invent.kde.org/education/gcompris/-/blob/master/src/activities/superbrain/superbrain.js#L143 -- You are receiving this mail because: You are watching all bug changes.