You need to think about how a darts match runs in the real world:
The
playGame()
function runs until one player gets down to zero. Each player takes it in turns to throw, and has a total of 3 throws. After each throw the score is checked to see if the game has ended. Repeat.
So
playGame()
should look something like:
while not finished
for darts = 1 to 3
score = player1.throw()
if score == 0
finished = true
break;
if finished
break;
// repeat the above for player 2
// repeat the entire process