Skip to content

Munfa/2048-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

2048-python

Introduction

This is 2048 game code in Python. Tkinter library is used for this code so that we can use the grid method for the display. This way, the game can be played similar to its original form. This game takes the input from the arrow keys of the keyboard and takes actions accordingly. Separate functions are created for these operations.

Technologies

Project created with:

  • PyCharm Community Edition 2022.3
  • Python 3.10.9
  • Tkinter Library(requires Python 3.7 or up)

SetUp

  • Intall Python 3.7 or up
  • Check if Python and pip installed
  • Run to check: python --veresion & pip -V
  • Install Tkinter using pip
  • Run command: pip install tk

Run Project

Use the arrow keys to move Up, Down, Left, and Right. The game will go on until reached 2048 or all the tiles are filled up and no move is left.

References

  1. https://www.youtube.com/watch?v=b4XP2IcI-Bg&t=302s
  2. https://www.youtube.com/watch?v=HTJCUBp_S2I

Output

The output of the Gameboard, Start of the game, Winning Board, and Game Over Board

GameBoard

Gameboard

Start

start

Win

win

Game Over

gameover

About

2048 game implementation in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%