5 kyu
Let's Play Darts!
203 of 943FrankK
Description:
Create your own mechanical dartboard that gives back your score based on the coordinates of your dart.
Task:
- Use the scoring rules for a standard dartboard:
- Finish method:
function getDartboardScore(x, y);
var score = getDartboardScore(-50, -30);
- Outside of the board: `"X"`
- Bull's eye: `"DB"`
- Bull: `"SB"`
- A single number, example: `"10"`
- A triple number: `"T10"`
- A double number: `"D10"`
- Bull's eye: `12.70 mm`
- Bull: `31.8 mm`
- Triple ring inner circle: `198 mm`
- Triple ring outer circle: `214 mm`
- Double ring inner circle: `324 mm`
- Double ring outer circle: `340 mm`
If you liked this kata, you can continue with: Let's Play Darts: Beat The Power!
Games
Algorithms
Similar Kata:
Stats:
Created | Jan 7, 2017 |
Published | Jan 7, 2017 |
Warriors Trained | 3891 |
Total Skips | 657 |
Total Code Submissions | 9395 |
Total Times Completed | 943 |
C# Completions | 162 |
Java Completions | 230 |
JavaScript Completions | 203 |
Python Completions | 283 |
Swift Completions | 65 |
Haskell Completions | 30 |
Total Stars | 174 |
% of votes with a positive feedback rating | 93% of 206 |
Total "Very Satisfied" Votes | 180 |
Total "Somewhat Satisfied" Votes | 24 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 10 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 6 kyu |