You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exercise of updating a player's score has an undefined behavior that is a teachable opportunity. The undefined behavior is what should happen when an attempt is made to update the score of a player who has not been added. There are two possibilities:
No change should occur (in which case the exercise should test for that and the student should guard against attempting to change a non-exesitant key in the dictionary)
The new player should be added (in which case the student should use the dictionary's key base subscript with a default value (sorry I couldn't find a better reference)
I can submit a PR for either behavior, but don't know which to prefer teaching.
The exercise of updating a player's score has an undefined behavior that is a teachable opportunity. The undefined behavior is what should happen when an attempt is made to update the score of a player who has not been added. There are two possibilities:
I can submit a PR for either behavior, but don't know which to prefer teaching.
swift/exercises/concept/high-score-board/.docs/instructions.md
Line 56 in f5e15a3
The text was updated successfully, but these errors were encountered: