KTHC4NHIBEI76UPNFN33GNSWGVTZ533QUZTUDSRY5OTBCJJEJENQC
/*
Package darts is for functions related to dart game.
*/
package darts
import "math"
// Score is for calculating the toss score based on the coordinates
func Score(x, y float64) (score int) {
rad := math.Sqrt(x*x + y*y)
switch {
case rad <= 1:
score = 10
case rad <= 5:
score = 5
case rad <= 10:
score = 1
default:
score = 0
}
return
}