anitab-org / powerup-android

PowerUp is an educational choose-your-own-adventure game that utilizes a users uploaded curriculum to empower pre-adolescents to take charge of their reproductive health. This is the Android version of the game.
GNU General Public License v2.0
117 stars 429 forks source link

Karma point adds abruptly with multiple taps. #1328

Open hridyakrishna opened 5 years ago

hridyakrishna commented 5 years ago

Description

The Karma points gets added when tapped more than a certain number of times in scene:home,school and hospital.

Mocks

ezgif com-video-to-gif

Acceptance Criteria

Update [Required]

The karma points scored by corrrect answers should be same even if tappped multiple times.

Definition of Done

Estimation

48 hours

hridyakrishna commented 5 years ago

May I work on this issue?

Rimjhim28 commented 5 years ago

@hsymphonyk The issue looks valid. Can you please find and comment here the reason behind the issue and how you want to fix this?

hridyakrishna commented 5 years ago

This issue can be resolved by making certain changes in the GameActivity.java file. SessionHistory.currScenePoints behaves normally when game is played slowly, but the score changes when the gameplay speed is increased. I hope this can be resolved by giving a seperate thread for adding points rather than being on the same thread as of UI. What do you suggest about this @Rimjhim28

geekanamika commented 5 years ago

@hsymphonyk @Rimjhim28 Can't we shift currScenePoints to preferences & update value off the main thread? Do we really need SessionHistory & static variables? Correct me If I'm wrong.

hridyakrishna commented 5 years ago

Hello,@geekanamika That is a good idea. Did you try implementing it?

Rimjhim28 commented 5 years ago

This sounds logical @geekanamika @hsymphonyk Can you work towards the solution the way suggested by @geekanamika

hridyakrishna commented 5 years ago

Hello @Rimjhim28, I will surely work the way suggested by @geekanamika.Thank you