Thanks for your review!
The value of each cell is randomly chosen when it spawns, so there is probably no algorithm, just 2 for loops to generate the board.