klbr8 / WPF_CS_DartScore

Click the dartboard to score a dart and the scoreboard will update for each dart added. Scores 01 and cricket games.
MIT License
0 stars 0 forks source link

Bug Report - Scoring is incorrect after removing the DoubleOn dart #9

Open klbr8 opened 2 days ago

klbr8 commented 2 days ago

Describe the bug During x01 game where doubling on is required, removing the dart that 'doubled on' causes it's score to be subtracted and is not fixed by replacing the dart.

To Reproduce Steps to reproduce the behavior:

  1. Start a game of x01 making sure to select the Double on checkbox. The quick 301 can be used.
  2. Click a double with your first dart marker.
  3. Click the marker to remove it and see the result.
  4. Try the same steps but try different numbers of darts thrown after the first before removal.
  5. Try the same but hit a non double with the first dart and a double with the second and something with the third.
  6. Remove the second dart and see the results

Expected behavior When a double on dart is replace in another double the temporary score should reflect that by updating correctly. When a double dart is moved to a non double the score should revert to 0 unless the second or third dart marker were in a double, which would need a correct update to the temporary score.

Additional context This functionality and problem code is most like in Dartboard.xaml.cs in the ScoreClick and DotClick private members.