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
为什么游戏无法在idea上运行
John Squirrels CodeGym-এ Website Admin
20 এপ্রিল 2022, 10:51
你遇到什么问题?请你把显示错误的截图发给我。
leonjusinov0070
লেভেল 1 , Germany, Germany
26 ফেব্রুয়ারি 2022, 12:55
Hallo
Lê Thanh Bình
লেভেল 0 , Viet Nam
15 আগস্ট 2021, 07:13
bủh