2048 - Complete python code for the 2048 game.
2048 is a single-player sliding tile puzzle video game.
The objective of the game is to slide numbered tiles on a grid to combine them to create a tile with the number 2048.
How to run this project -
Step - 1 :
Before going any further, make sure that you have python installed in your computer. In case you don’t have python, go to - https://www.python.org/downloads/ and then just click on the download button to download the latest verison of python3 available.
Step - 2 :
Now you have to download this project. For this you should navigate to the top level of the project (SDN in this case) and then a green “Code” download button will be visible on the right. Choose the Download ZIP option from the Code pull-down menu. That ZIP file will contain the entire repository content.
Step - 3 :
After downloading this project, extract the downloaded project.
Step - 4 :
Open command prompt and then switch to your Python file’s directory. Type cd and a space, then type in the “Location” address for your Python file and press ↵ Enter.
For example, to open a Python file in a folder named “Files” on your Desktop, you would enter cd desktop/Files here.
If you copied the path to the file, you can type in cd and a space and then press Ctrl+V to paste in the path.
Step - 5 :
Enter the “python” command and your file’s name. Type in python file.py where file is your Python file’s name.
For example, if your Python file is named “main”, you will have to type - python main.py .
How to play -
Use the keys - ‘W’, ‘S’, ‘A’. ‘D’ for up, down, left and right movement of the slides.
Try to combine the slides in such a way to make the mubmer 2048.
Enjoy!