Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let difference = abs(targetValue - currentValue)
- let points = 100 - difference
- if difference < 0 {
- score += points
- let message = "You scored (points) points"
- }
- let message = "The value of the slider is: (currentValue)" +
- "nThe target value is: (targetValue)" +
- "nThe difference is: (difference)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement