D16492: Rewrite current bargame algorithm to use a generalized version of nim agorithm

Akshay Kumar noreply at phabricator.kde.org
Mon Oct 29 19:49:11 GMT 2018


AkshayCHD added a comment.


  Hii Johnny, sorry I didn't get you, are you discussing the logic of the changed algo or suggesting what the algo should be like. For this algo i tried to implement the logic of game of nim, which takes XOR of number of stones in each pile to find the winner as shown here, https://en.wikipedia.org/wiki/Nim#Proof_of_the_winning_formula I divided the bar into a set of piles and assigned that to pilesSets variable . Removing stones is analogous to adding balls in our case.

REPOSITORY
  R2 GCompris

REVISION DETAIL
  https://phabricator.kde.org/D16492

To: AkshayCHD, #gcompris_improvements
Cc: jjazeix, kde-edu, #gcompris_improvements, harrymecwan, ganeshredcobra, nityanandkumar, echarruau, rahulyadav, narvaez, scagarwal, apol, timotheegiet, hkaelberer, bcoudoin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20181029/a6d2ee47/attachment.html>


More information about the kde-edu mailing list