- Download the project
- Open a CLI on the project directory and enter the following:
python main.py
- A 4x4 window will be opened after you enter the command
- Use your arrow keys to move the tiles. Tiles with the same number merge into one when they touch. Add them up to reach 2048!
This code is an Oriented Object Program that shows the applications and structure of this paradigm. You can check how this code was build in the following link.
-
colors.py: This file contains the graphical properties of the game (colors, fonts, size, etc).
-
main.py: This file is the main piece of code of the project.
I used VSCode as source-code editor. Also, I have employed the following modules listed in main.py header:
tkinter
for Graphic User Interfacesrandom
to place cell values randomly at the begining of the game.