flutter_2048 icon indicating copy to clipboard operation
flutter_2048 copied to clipboard

Fixed #1: The game stops working when the board is full

Open liplum opened this issue 3 months ago • 0 comments

After inspecting the code, I found this function was the cause. https://github.com/angjelkom/flutter_2048/blob/ca1c660f5e737ee51fb4259130b08c7677c62433/lib/managers/board.dart#L140-L148 The loop is endless when the indexes gets all 16 numbers. And based on this algorithm, the probability of generating tiles at each location is not.

liplum avatar Mar 11 '24 15:03 liplum