Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint as ri
- def dice_poker():
- dice1 = ri(1, 6)
- dice2 = ri(1, 6)
- dice3 = ri(1, 6)
- dice4 = ri(1, 6)
- dice5 = ri(1, 6)
- pair = dice1 == dice2 or dice1 == dice3 or dice1 == dice4 or dice1 == dice5 or dice2 == dice1 or dice2 == dice3 \
- or dice2 == dice4 or dice2 == dice5 or dice3 == dice1 or dice3 == dice2 or dice3 == dice4 or dice3 == dice5\
- or dice4 == dice1 or dice4 == dice2 or dice4 == dice3 or dice4 == dice5 or dice5 == dice1 or dice5 == dice2\
- or dice5 == dice3 or dice5 == dice4
- print("Wylosowana wartość kości: " +str(dice1))
- print("Wylosowana wartość kości: " +str(dice2))
- print("Wylosowana wartość kości: " +str(dice3))
- print("Wylosowana wartość kości: " +str(dice4))
- print("Wylosowana wartość kości: " +str(dice5))
- if dice1 == dice2 == dice3 == dice4 == dice5:
- print("Poker!!!")
- elif dice1 == 1 and dice1<dice2<dice3<dice4<dice5:
- print("Small street!")
- elif dice1 == 2 and dice1<dice2<dice3<dice4<dice5:
- print("Big street!")
- elif dice1 == dice2 == dice3 == dice4 or dice2 == dice3 == dice4 == dice5 or dice3 == dice4 == dice5 == dice1:
- print("Kareta!")
- elif pair:
- count_pair = 0
- count_pair = count_pair + 1
- if count_pair == 1:
- print("You've got pair")
- if count_pair > 1:
- print("You've got "+str(count_pair)+" pairs.")
- dice_poker()
- # Znaczenie układów kości
- # Nic – pięć nie tworzących żadnego układu oczek.
- # Para – dwie kości o tej samej liczbie oczek.
- # Dwie Pary – dwie pary kości, o tej samej liczbie oczek.
- # Trójka – trzy kości o tej samej liczbie oczek.
- # Mały Strit – kości pokazujące wartości od 1 do 5, po kolei.
- # Duży Strit – kości pokazujące wartości od 2 do 6, po kolei.
- # Full – jedna para i trójka.
- # Kareta – cztery kości o tej samej liczbie oczek.
- # Poker – pięć kości o tej samej liczbie oczek.
Add Comment
Please, Sign In to add comment