davhojt
42f381f010
|
2 years ago | |
---|---|---|
.. | ||
audit | 2 years ago | |
resources | 2 years ago | |
README.md | 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:
- Set up a development environment for the game.
- Create the 4x4 table and fill it with tiles valued at either 2 or 4.
- 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.
- If two tiles with the same value collide, merge them into one tile with twice the value and update the score.
- Add a new tile to the board randomly after each move.
- Use animation to smoothly move the tiles.
- Stop the game when no legal moves are possible and allow the user to restart.
- Update the best score if necessary when the game is over.
- Include functionality to track and display the current and best scores.
- Test the game thoroughly to ensure that it is functioning correctly and all objectives have been met.
- 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:
- Adding a user interface (UI) to the game, such as buttons for moving the tiles and displaying the current and best scores.
- 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.).
- Adding sound effects or music to enhance the gameplay experience.
- Adding support for different devices and screen sizes, such as tablets or smartphones.
- By taking these additional factors into account, you can create a more polished and enjoyable version of the "2048" game.