This is an implementation of the game 2048 with a Tkinter interface.
Access the game2048 folder : cd game2048/
For an MVP version that can be played with the terminal, launch python play_2048.py
.
You then have to chose the size of the grid (4
for a 4x4 grid) and the play theme (1
for a classic theme).
$ python play_2048.py
Choisissez la taille de la grille:4
Choisissez votre theme (1 (nombres), 2 (chimie), 3 (alphabet)):1
Here is how the interface looks like :
=== === === ===
| | | | 2 |
=== === === ===
| | | | |
=== === === ===
| 4 | | | |
=== === === ===
| 8 | 4 | 4 | |
=== === === ===
Entrez votre commande (g (gauche), d (droite), h (haut), b (bas)):g
Select your move (g
for left, d
for right, h
for up, g
for down), then press Enter, and repeat it until the end of the game.
You can play with a graphic interface by running python display_grid.py
. Select the grid size and the theme with the menu, then click Play
.
Here is how the graphic interface looks like :
You can play by using the regular arrows on your keyboard (↑ ↓ → ←). The button Undo
allows you to cancel your last move.
Here are some other play themes that you can use :
- Chemistry : using chemical element symbols instead of numbers (H, He, Li, Be...)
- Alphabet : using alphabet letters instead of numbers (A, B, C, D...)