According to the rules, when you start a game, the values of two random cells must be 2 or 4 (with a
probability of 90% and 10%, respectively).
To satisfy this requirement, create a createNewNumber() method and call it twice in the createGame() method.
The createNewNumber() method:
1) selects a ra
2048 (Part 5/18)
- 3
Locked
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
V1NZ
2 April, 15:11
idk whats wrong
0
张明月 Backend Developer
2 July 2021, 07:48
The createNewNumber() method must assign a new value of 2 or 4 (with a probability of 90% and 10%, respectively) to a random empty cell in the gameField matrix. 这个是什么错误?
+1