Oware: Add methods for https://bugs.launchpad.net/ubuntu-system-settings-online…

Authored by dmadaan on Aug 16 2017, 12:33 PM.


dmadaanAug 16 2017, 12:33 PM
R2:6fe10f9714e7: Oware: Remove logs, change index to value in text above seeds houses
Restricted Application added a subscriber: jjazeix. · View Herald TranscriptAug 16 2017, 12:36 PM

The method followed for each move is : Initial animation -> setValues -> ScoreAnimations
We can't do scoreAnimations before setValues because The values of the house repeater seeds need to be updated first (else you have the old seeds i.e before the move)
After the setValues we have both the cellGridRepeater and house in sync with good values but now we have the house from where seeds are captured's seeds = 0 so I had to set it's value to the no of seeds I need to move and the animation starts.
After the animation I need to set the model value back to 0 but it loses binding, it remains 0 for the complete game, steps to reproduce:
Capture a house, move any seed to that house, you will have good number at house top but not the amount of seeds.
I also get the bug https://bugs.launchpad.net/ubuntu-system-settings-online-accounts/+bug/1231729 in which one of the comments it is mentioned that in which https://bugs.launchpad.net/ubuntu-system-settings-online-accounts/+bug/1231729/comments/2 has a similar situation. If I don't set the value back to 0 it works but again you will just have the number of seeds set at that time and it no longer updates with the value binding.
I have tried even setting all the models again in js as I do for setValues but I get the same bug.