Skip to content

prathmesh0203/2048

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

2048

This repository contains a Python implementation of the popular puzzle game 2048, with a graphical user interface (GUI) built using the Tkinter library. The game allows players to slide numbered tiles on a grid to combine them and create larger tiles. The objective is to reach the 2048 tile by strategically merging tiles and maximizing the score.

Features:

  1. Simple and intuitive gameplay: Use arrow keys or 'WASD' keys to move the tiles in four directions.
  2. Visual feedback: The GUI displays the current state of the grid with colorful tiles and updates in real-time.
  3. Score tracking: The game keeps track of the current score, which increases as tiles are merged.
  4. Game termination: The game ends when the grid is full and no more moves are possible or when the player reaches the 2048 tile.
  5. Continue playing: After reaching the 2048 tile, players have the option to continue playing and aim for higher scores.
  6. Game over notification: If the grid is full and no more moves are possible, the game notifies the player that it is over.

To run the game, you need to have Python installed on your machine. Simply execute the Python script 2048_game.py in a Python environment with Tkinter support, such as IDLE or Jupyter Notebook.

This implementation of 2048 provides a basic version of the game with a GUI, focusing on core gameplay mechanics and a responsive user interface. It can serve as a starting point for further enhancements, such as saving and loading game states, implementing AI players, or adding additional features to the GUI. Feel free to fork, modify, and build upon this code to create your own version of the 2048 game.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages