You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
davhojt 42f381f010 style: prettier 2 years ago
..
audit style: prettier 2 years ago
resources chore(mobile-dev): move resources closer to each project 2 years ago
README.md style: prettier 2 years ago

README.md

twenty-forty-eight

Introduction:

It is April 2014, and the popular game "2048" has not yet been released. Your task is to implement the game before the official release. To do this, you will need to create a 4x4 table and fill it with tiles valued at either 2 or 4. The game should start with 3-4 tiles placed randomly on the board.

Players should be able to swipe the tiles in any of the four directions, and the tiles will move as far as possible in that direction. If two tiles with the same value collide, they should merge into one tile with twice the value, and the score should be updated accordingly. After each move, a new tile should appear randomly in an empty slot on the board.

Use any animation to smoothly move the tiles. You can choose the colors for the tiles, but it is preferred to use the colors from the original "2048" game.

The game should stop when no legal moves are possible and allow the user to restart. When the game is over, the best score should be updated if necessary.

Remember to include functionality to track and display the current and best scores. Good luck!

To complete this exercise, you will need to do the following:

  1. Set up a development environment for the game.
  2. Create the 4x4 table and fill it with tiles valued at either 2 or 4.
  3. Implement the ability for players to swipe the tiles in any of the four directions and have them move as far as possible in that direction.
  4. If two tiles with the same value collide, merge them into one tile with twice the value and update the score.
  5. Add a new tile to the board randomly after each move.
  6. Use animation to smoothly move the tiles.
  7. Stop the game when no legal moves are possible and allow the user to restart.
  8. Update the best score if necessary when the game is over.
  9. Include functionality to track and display the current and best scores.
  10. Test the game thoroughly to ensure that it is functioning correctly and all objectives have been met.
  11. Remember to follow best practices for coding and game development, and be sure to document your code and any decisions made during the development process. Good luck!

Some additional considerations for this exercise might include:

  1. Adding a user interface (UI) to the game, such as buttons for moving the tiles and displaying the current and best scores.
  2. Implementing difficulty levels or other gameplay options, such as the ability to choose the value of the tiles (e.g. 2, 4, 8, etc.) or the size of the board (e.g. 4x4, 5x5, 6x6, etc.).
  3. Adding sound effects or music to enhance the gameplay experience.
  4. Adding support for different devices and screen sizes, such as tablets or smartphones.
  5. By taking these additional factors into account, you can create a more polished and enjoyable version of the "2048" game.