To begin with, we were given the challenge of coding a darts game

this is a part of the assignment - does anyone have any suggestion, i am completly baffled as to were to start. Any help whatsoever would be appreciated.

description of coding -

Joe and Sid have devised a new game.

1. They each throw one dart per turn,

2. The dart board has a bull and twenty segments around the bull only. There are no trebles or doubles, no outer,

3. The numbered segments around the bull are, in sequence from the top:

20, 1, 18, 4, 13, 6, 10, 15, 2, 17, 3, 19, 7, 16, 8, 11, 14, 9, 12, 5, 20. You will need this for part 10.

4. They each start with a score of 301 and aim to reduce this to zero as quickly as possible,

5. Scoring throws aimed at the bull result in

50 if the bull is hit, or

a number in the range 1 to 20, each equally likely, if not,

6. Games must end from a score of fifty by hitting the bull

7. Any other score that would take the total below fifty is ignored.

8. To home in on a final score of fifty you need to be able to throw at any given single number in the range one to twenty e.g. from sixty seven you would aim for seventeen.

9. Joe and Sid hit bulls with, as before, 70% and 72% success rates respectively.

10. Both Joe and Sid will hit the single number they aim at 80% of the time or, if missing, its left neighbour 10% of the time or right neighbour 10% of the time.

actual task -

Task 1:

The task is to code up this more realistic darts game and explore its characteristics. The minimum game lasts seven throws (one plus six bulls).

a. What are the frequencies of game lengths? That is, if Joe were playing alone what percentage of games would last seven throws, eight throws, etc. on average?

b. If Joe and Sid were to play each other (rules as in part 0) how would Joe get on?

The program: You will need a function bull() but this time it returns not {true, false} but {1 to 20, 50}. You will also need a function to simulate throwing at a single number. This, I suggest, needs an array to contain the definition of the sequence of numbers around the edge of the dart board so that you can determine the neighbours of the target number.

this is a part of the assignment - does anyone have any suggestion, i am completly baffled as to were to start. Any help whatsoever would be appreciated.

description of coding -

Joe and Sid have devised a new game.

1. They each throw one dart per turn,

2. The dart board has a bull and twenty segments around the bull only. There are no trebles or doubles, no outer,

3. The numbered segments around the bull are, in sequence from the top:

20, 1, 18, 4, 13, 6, 10, 15, 2, 17, 3, 19, 7, 16, 8, 11, 14, 9, 12, 5, 20. You will need this for part 10.

4. They each start with a score of 301 and aim to reduce this to zero as quickly as possible,

5. Scoring throws aimed at the bull result in

50 if the bull is hit, or

a number in the range 1 to 20, each equally likely, if not,

6. Games must end from a score of fifty by hitting the bull

7. Any other score that would take the total below fifty is ignored.

8. To home in on a final score of fifty you need to be able to throw at any given single number in the range one to twenty e.g. from sixty seven you would aim for seventeen.

9. Joe and Sid hit bulls with, as before, 70% and 72% success rates respectively.

10. Both Joe and Sid will hit the single number they aim at 80% of the time or, if missing, its left neighbour 10% of the time or right neighbour 10% of the time.

actual task -

Task 1:

The task is to code up this more realistic darts game and explore its characteristics. The minimum game lasts seven throws (one plus six bulls).

a. What are the frequencies of game lengths? That is, if Joe were playing alone what percentage of games would last seven throws, eight throws, etc. on average?

b. If Joe and Sid were to play each other (rules as in part 0) how would Joe get on?

The program: You will need a function bull() but this time it returns not {true, false} but {1 to 20, 50}. You will also need a function to simulate throwing at a single number. This, I suggest, needs an array to contain the definition of the sequence of numbers around the edge of the dart board so that you can determine the neighbours of the target number.

Topic archived. No new replies allowed.