Darts

in #italast month

export const score = (x,y) => {

let radius = Math.sqrt(x*x+y*y);

if (radius <= 1) return 10;

else if (radius > 1 && radius <= 5) return 5;

else if (radius > 5 && radius <= 10) return 1;

else return 0;

};

Sort:  

Thank you for your witness vote!
Have a !BEER on me!
To Opt-Out of my witness beer program just comment STOP below


Hey @drago18121996, here is a little bit of BEER from @isnochys for you. Enjoy it!

Learn how to earn FREE BEER each day by staking your BEER.

Thank you for your witness vote!
Have a !BEER on me!
To Opt-Out of my witness beer program just comment STOP below


Hey @drago18121996, here is a little bit of BEER from @isnochys for you. Enjoy it!

We love your support by voting @detlev.witness on HIVE .