# 2048

நிலை
5+
Once upon a time there lived a young Italian named Gabriele Cirulli. He was a student of programming. One day, while doing a coding exercise, he made a breakthrough in the gaming industry entirely by accident. How did he manage to do that? To complete the exercise, he chose to write a game with something similar to an existing puzzle game called "Threes". Gabriele, who named the game "2048", spent two days on its implementation. The game was free and staggeringly successful! Even if you haven't played 2048 yourself, your friends and acquaintances most likely have. Or you've seen people playing it on public transport. Remember those colorful numbered tiles that filled smartphone screens several years back? That's 2048! The game's name isn't random. 2048 is 2 raised to the 11th power. In the game, everything is based on powers of two. The rules are short and sweet: you have a 4x4 board divided into square tiles. A tile with a value of 2 (probability of 90%) or 4 (probability of 10%) appears in each round. All the tiles can be moved to one of the four sides. If two tiles with the same value "collide", they merge and the tile value doubles. The objective is to get a tile whose value is 2048. The player loses if another move is no longer possible. What's so special about the game? First of all, it's very easy to play in a browser or on a smartphone. Let's create our own version of the game right on CodeGym. Who knows? Maybe after doing this you will also accidentally invent your own wildly successful puzzle game? Carry on!
கருத்துக்கள் (40)
ஒரு கருத்தைத் தெரிவிக்க நீங்கள் உள்நுழைந்திருக்க வேண்டும்
Anonymous #11482420
நிலை 0 , France
3 மார்ச், 09:37
``````

``````
Anonymous #11482420
நிலை 0 , France
3 மார்ச், 09:36
``````

``````
Anonymous #11482420
நிலை 0 , France
3 மார்ச், 09:35
vous parler tous englais ou coi
Anonymous #11388504
நிலை 2 , Granbury, United States
8 செப்டம்பர் 2023, 01:32
Part 17 says "I think you long ago noticed the line at the bottom of the game board: "Score: 0"." However there is no score displayed even after I implement the changes.
Anonymous #11138917
நிலை 2 , China, China
8 செப்டம்பர் 2023, 10:04
I use ↑↓→, the reaction is different
Anonymous #11388504
நிலை 2 , Granbury, United States
7 செப்டம்பர் 2023, 14:47
Part 3 says "A void createGame() method..." with no indication that it needs to be private.
Anonymous #11138917
நிலை 2 , China, China
4 செப்டம்பர் 2023, 09:13
I attempted to run the code, and when I used the "moveUp()" function, the outcomes didn't match my expectations. Consequently, I made some adjustments to my code in an attempt to address the issue correctly. However, even after applying the provided example to solve the problem, the results still didn't align with what I had anticipated. Furthermore, I noticed that the changes made to the two-dimensional array after calling "moveUp" didn't follow the "rotateClockwise()" method as expected, which left me feeling somewhat puzzled. Regrettably, due to space constraints, I'm unable to share my code here. If it's possible, could you please reach out to me via email? I would greatly appreciate any guidance or assistance you can provide. My email address is: moryforcola@outlook.com Thank you very much for your help.
WuYtao
நிலை 0 , United States
22 ஆகஸ்ட் 2023, 17:45

Cute Killer
நிலை 13 , 浙江, 中国
19 ஏப்ரல் 2022, 17:09