D21461: Multiplle datasets for money activity
Johnny Jazeix
noreply at phabricator.kde.org
Tue Jun 4 12:49:29 BST 2019
jjazeix added inline comments.
INLINE COMMENTS
> money.js:73
> + for(var i = 0; i < pocket.length; i++) {
> + if(pocket[i].val <= 2)
> + count++
small typo: available
> money.js:74
> + if(pocket[i].val <= 2)
> + count++
> + }
I would use the dataset moneyItems, not directly the Constants one. Else the specific items won't be used.
I guess you can use slice to copy the array (https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Array/slice)
> money.js:86
> var pocket = Core.shuffle(data.pocket)
> + var coinCount = getCoinCount(pocket)
> + items.pocketRows = ((data.pocket.length - coinCount / 2) > 9) ? 3 : 2
I think the part: (avaliableCurrency[i].val > amountToBeCovered) is not needed because it should always be the case before breaking as we start from the higher value in a sorted array.
REPOSITORY
R2 GCompris
REVISION DETAIL
https://phabricator.kde.org/D21461
To: AkshayCHD, #gcompris_improvements
Cc: asagtani, jjazeix, kde-edu, #gcompris_improvements, sanjayshetty, parimalprasoon, harrymecwan, ganeshredcobra, nityanandkumar, echarruau, andreask, rahulyadav, narvaez, scagarwal, apol, timotheegiet, bcoudoin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190604/cfc845da/attachment-0001.html>
More information about the kde-edu
mailing list