We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77bd301 commit d1d6acfCopy full SHA for d1d6acf
darts multiplayer.py
@@ -0,0 +1,28 @@
1
+player1 = 501
2
+player2 = 501
3
+player = 1
4
+print("NEW GAME\n")
5
+
6
+while(player1 != 0 and player2 != 0):
7
8
+ if player == 1:
9
+ a = int(input("PLAYER1 score: " + str(player1) + " | enter total from 3 darts: "))
10
+ player1 = int(player1)
11
+ if player1 - a > 0:
12
+ player1 = player1 - a
13
+ player = 2
14
+ else:
15
+ player1 = 0
16
+ player2 = 0
17
+ print("PLAYER1 win")
18
19
+ if player == 2:
20
+ a = int(input("PLAYER2 score: " + str(player2) + " | enter total from 3 darts: "))
21
+ player2 = int(player2)
22
+ if player2 - a > 0:
23
+ player2 = player2 - a
24
+ player = 1
25
26
27
28
+ print("PLAYER2 win")
0 commit comments