Skip to content

ajout de fct verif Gauche

Mahdane Amine requested to merge gauche into develop

The function verifGauche checks if any tiles in the grid can be shifted to the left according to the game’s rules. In the game of 2048, tiles can move left if:

There is an empty space immediately to the left. There is an adjacent tile with the same value to the left, allowing for a merge. This function helps determine if a leftward move is possible, which can impact whether the player has any valid moves left. The function typically iterates over the grid and checks each tile’s neighboring cell to the left. If any tile meets the criteria for movement or merging, verifGauche returns True, indicating that a left move is possible. Otherwise, it returns False.

Merge request reports

Loading