Skip to content
Extraits de code Groupes Projets
Valider e8c06279 rédigé par Adrien Payen's avatar Adrien Payen
Parcourir les fichiers

commit pour nathanael

parent b9cdfc4f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -28,11 +28,76 @@ def risky(): ...@@ -28,11 +28,76 @@ def risky():
return random.choices(choix,[0.25, 0.25, 0.25, 0.25])[0] return random.choices(choix,[0.25, 0.25, 0.25, 0.25])[0]
def restart() :
if i in layout == 1 :
g[i] = g[0]
return
def Penalty() :
if i in layout == 2 :
g[i] = g[i-3]
return
def Prison() :
if i in layout == 3 :
# passer son tour
# markovDecision(layout,circle) # markovDecision(layout,circle)
def markovDecision(layout, circle : bool) :
return Expec, Dice
# Fonction de modification du circle pour faire une boucle si True
def circle(bool) :
if bool == True :
g[14][0] = 1
# pprint(g) # si le dés dépasse la case 15 alors il recommence au début
return g
pprint(circle(False))
np.random.seed(0) np.random.seed(0)
layout = np.ndarray([0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 1, 0]) layout = np.ndarray([0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 1, 0])
choices = [0,1,2,3] choices = [0,1,2,3]
print(layout) print(layout)
print(np.linspace(1,15,15, dtype=np.float16)) print(np.linspace(1,15,15, dtype=np.float16))
markovDecision(layout, circle(True))
players = dict()
player_values = list()
def Create_players(players, player_values) :
while True :
total_players = input("Choose total number of player (1): ").strip()
if total_players not in ['1'] :
print("Invalid input !")
else :
print("Total players in the game {}".format{total_players})
total_players = int(total_players)
for player_index in range(1, total_players + 1 ) :
while True :
set_marker = input("Now set your sign player {} : (alphabet only)".format(player_index)).strip().upper()
if len(set_marker) != 1 or not(set_marker >= "A" and set_marker <= "Z") :
print("Invalid Sign Choosen !")
else :
player_values.append(set_marker) # market set
player_values.append(0) # position initiale en 0
print('hi')
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter