This is a 2048 game I implemented using the .NET MAUI framework. The game allows you to play the classic 2048 game on multiple platforms such as Android, iOS, Mac Catalyst, and Windows.
- Classic 2048 gameplay
- Swipe to move tiles
- Undo last move
- Track score and high score
- Restart the game
- .NET 8 SDK
- A development environment with support for .NET MAUI (Visual Studio 2022 recommended)
-
Clone the repository:
git clone https://github.com/Brainydaps/Maui2048.git
-
Open the solution in Visual Studio 2022.
-
Restore the project dependencies:
dotnet restore
-
Build and run the project on your preferred platform (Android, iOS, Mac Catalyst, or Windows).
- Swipe (or use arrow keys) to move the tiles.
- When two tiles with the same number touch, they merge into one.
- The goal is to create a tile with the number 2048.
- Swipe/Arrow Keys: Move tiles in the corresponding direction.
- Undo Button: Revert to the previous move.
- Restart Button: Start a new game.
MainPage.xaml
andMainPage.xaml.cs
: Contains the UI and game logic.GameGrid
: The grid layout for the game tiles.ScoreLabel
andHighScoreLabel
: Displays the current score and high score.Undo
andRestart
Buttons: Provides functionality to undo the last move and restart the game.
Contributions are welcome! Please fork this repository and submit pull requests.
This project is licensed under the CC by NC 4.0 License. See the LICENSE file for details.
Brainydaps - GitHub