Here's what I started with: $score = $_GET I only outputted the first set of values to shoot at, not all values. I looped it three times (even though only 1 or 2 darts might be necessary), and 2. I wrote this incorrectly/inefficiently though because 1. I started writing a script that looped through the values and pulled the first values that added up. score is 170, could hit 2 triple 20s (2*60), and a double bulls eye (2*25). The game ends when you hit an exact score with the darts (3, 2 or 1) and the last dart is a double, (eg. I'm trying to make a script for a dart game (301/501) that will calculate what to shoot at to finish a game. I haven't been able to find any scripts or code for darts, so I've been writting my own if anyone knows of a site that has these please let me know (I've searched multiple ways with no luck).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |