Skip to main content

PyGTK implementation of the popular 2048 game

Project description

Play the popular game of 2048

A PyGTK implementation of Gabriele Cirulli’s game of 2048 which is itself a clone of 1024 and based on Saming’s 2048 (also a clone).

Installation

Open a terminal and enter the following command:

pip install py2048-game

In case you don’t have the right things installed and you don’t feel like installing them, there is still the old way that I created before I learned setuptools:

wget https://raw.githubusercontent.com/ralphembree/py2048/master/install.sh -q -O - | bash

The old way does a little bit more than the new way because I’m still learning the new way. Either one will create the py2048 executable, so the game can be started from the command prompt with a simple “py2048”. The old way, in addition, puts an entry in your Games menu.

Features

  • Moves can be undone with the click of a button.

  • Games can be saved in user-specified files to be resumed later.

  • Grid can be resized to preference.

  • In addition to the keyboard, there are two kinds of mouse interaction:

  • Swipe: click and hold and then move in the direction desired

  • Click: each section of the grid (top, bottom, left, right) when clicked will move the tiles in a different direction. The cursor will be an arrow pointing in the direction the tiles would go if you clicked.

  • The colors in the grid can be rerandomized at any time (without messing up your game).

Screenshot

Screencapture of game

How to play

The arrow keys determine which direction all of the tiles move. Tiles with the same number that hit each other merge into one tile. Each time tiles are moved, another tile is added to the board. The game is over when no more tiles can be merged.

Shortcut keys

Key

Action

Alt-N

Start new game

Ctrl-N

New grid size (user defined)

Alt-U/Ctrl-Z

Undo

Ctrl-C

New color scheme

Ctrl-M

Toggle mouse modes (swipe or click)

Ctrl-O

Load saved game

Ctrl-Shift-S

Save game under a different name

Ctrl-S

Save game to previously-defined file

F11

Toggle fullscreen

F1

Help

Ctrl-Q

Quit

License

py2048 is a Python implementation of the popular game of 2048. Copyright © 2014 Ralph Embree

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is destributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py2048-game-1.0.1.tar.gz (13.0 kB view details)

Uploaded Source

File details

Details for the file py2048-game-1.0.1.tar.gz.

File metadata

  • Download URL: py2048-game-1.0.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for py2048-game-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c918a9c8835b8573912a19600f30620217b4d3b07f9cc588011de60c30fd2535
MD5 cfc0264b8a1b7ac6915e3a6f1066f5ea
BLAKE2b-256 5cb89156e845cb0905ff29b8cbd1289b8907297dffa036987939ac0512c142c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page