This project is a simple implementation of the 2048 Game using Haskell. The game is played on a 4x4 grid, where the player combines tiles with the same numbers to achieve the tile with the number 2048.
- Console-based gameplay
- Leaderboard to track high scores
- Multiple players with individual high scores (Use Switch Player feature)
- Move the tiles up, down, left, and right to merge and create higher-value tiles
- Random tile generation after each move
- Hack Leaderboard - Modify Player's Score
- Hack Leaderboard - Remove Player from Leaderboard (Cannot remove Current Player | Need to switch player first)
- Hack Leaderboard - Reset all scores in Leaderboard to 0
- Keep logs of every menu that user chosed in logs.txt
- Load leaderboard data from leaderboard.txt when starting the app
- Save leaderboard data to leaderboard.txt when exiting the app
To run the game, you need to have Haskell installed on your system. Follow these steps to get started:
- Clone the repository:
git clone https://github.com/jasonyapri/2048-haskell.git
- Navigate to the src project directory:
cd 2048-haskell
- Build the Project and Run the App
cabal build
cabal run
- After running the game, first thing you need to do is enter your name.
- Then you will be greeted with the Main Menu (8 options)
- Choose your desired action entering the number on the Main Menu
- Enter '9' to Show How To Play (?)
- Enter '1' to Start Playing
- Enter 'w' to move the tile up
- Enter 'a' to move the tile left
- Enter 's' to move the tile down
- Enter 'd' to move the tile right
- Enter 'q' to go back to the main menu
- We cannot enter a name that doesn't exist in the leaderboard yet.
- Use Switch Player to input a new Player's name
- We cannot remove a player that doesn't exist in the leaderboard.
- Use Switch Player to input a new Player's name
- You cannot remove current Player's score.
- In my case, I cannot delete Stefan's score, as I am playing using Stefan.
- Deleted Jason's score. View the changes by entering '2' (Show Leaderboard)
Jason Yapri
https://linkedin.com/in/jasonyapri/
https://jasonyapri.com
https://play2048.co/
(Created by Gabriele Cirulli)