Poker dice


can i discuss a project that is not in the program?

poker dice built with functions and lists, files

Here in the Corner Bar we are free to explore and discuss topics of all ranges so long as they are not political or religious (or deal directly with track lessons). Computing, programming, gaming, etc. are all on the table.


i am building a poker dice game using functions, lists and files
the project is devided by many functions
it containes 5 dices, they have figures(A,King, valet, dame, X,9)
the aim is to get combination of 3 rolling at max, we will have 8 results:
quinton(5 identical figures)
Carre(4 identical figures)
Full(3 identical+2identical)
Brelan(3 identical)
Sequence(5 that follows,like As, K,D,V,X,9)
2_paires(2identical,2 identical)
une_paire(2 identical)
others(other combination)

the first roll should print results(A,R,D,V,X ou 9). of the 5 dices

result should be like

lancer 1 : DRV9D
relance : 5
lancer 2 : DRV99
relance : 1,2,3
lancer 3 : AAA99
fin : Full

this is my function

def lancer_des(num_lancee):
simule le lancer de dés equilibrés

:param n: (int) nombre de dés a lancer
:return: (list) liste des resultats obtenus
des_1 = random["A", "R", "D", "V", "X", "9"]

# while num_lancee==1:

resultat = des_1
entree = input("Veuillez lancer le des", des_1)
for i in range(5):
    resultat +=  [random.choice([1,2,3,4,5])] # variante de randint(1,6)

return resultat

Not a word. The singular is die and the plural is dice. Just thought I’d mention that, owing that English is not your native tongue?

The Queen (dame) ranks higher than the Jack (valet), so that 2 dame will beat 2 valet.

There are five dice, does this mean there can be five-of-a-kind?

yeah which is the quinton, 5 of a kind

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.