diff --git a/game2048/grid_2048.py b/game2048/grid_2048.py index 84cb40e67285960b1421c64c4e6236b5b898f9e4..3a44c3803a55e12ca9523ec456cf07cc810a5353 100644 --- a/game2048/grid_2048.py +++ b/game2048/grid_2048.py @@ -188,12 +188,8 @@ def did_you_win (grid): #Fonctinnalité 6 -<<<<<<< HEAD -def list_moove_possible (grid): - #renvoie la liste des deplacements possibles -======= def list_move_possible (grid): ->>>>>>> c7f7a81e42fe1f954e38b492c9d251128aa9cf68 + #renvoie la liste des deplacements possibles list_bool=move_possible(grid) list_final=[] if list_bool[0]: @@ -216,27 +212,24 @@ def random_play(): #phase de jeu while not is_game_over(grid_game): -<<<<<<< HEAD #pour chaque tour - d=rd.choice(list_moove_possible(grid_game)) #on choisi un mouvement + d=rd.choice(list_move_possible(grid_game)) #on choisi un mouvement grid_game=move_grid(grid_game,d) #on le fait grid_game=grid_add_new_tile(grid_game) #une tuile se crée print(grid_to_string_with_size_and_theme(grid_game,THEMES["0"],4)) #on affuche le résulat print("\n***********************************\n") #permet aux différentes grilles d'être plus lisible #vérification si le jeu est gagnant ou perdant -======= d=rd.choice(list_move_possible(grid_game)) grid_game=move_grid(grid_game,d) grid_game=grid_add_new_tile(grid_game) print(grid_to_string_with_size_and_theme(grid_game,THEMES["0"],4)) print("\n***********************************\n") ->>>>>>> c7f7a81e42fe1f954e38b492c9d251128aa9cf68 if did_you_win(grid_game): print("CONGRATS ! YOU WON !!!") else : print ("YOU FAIL, TRY AGAIN") return() -#TEST : random_play() +random_play()