Book Image

Kivy Blueprints

By : Vasilkov
Book Image

Kivy Blueprints

By: Vasilkov

Overview of this book

This book is intended for programmers who are comfortable with the Python language and who want to build desktop and mobile applications with rich GUI in Python with minimal hassle. Knowledge of Kivy is not strictly required—every aspect of the framework is described when it's first used.
Table of Contents (12 chapters)
10
A. The Python Ecosystem
11
Index

About the game


For the uninitiated, the game of 2048 is a math puzzle where you combine numbers to get to 2048 and possibly beyond that, to 4096 and 8192 (albeit this may prove challenging, so 2048 is a sufficiently hard-to-achieve winning condition). The board is a 4×4 square grid. It is mostly empty at first, with a few 2 tiles. Each turn the player moves all tiles in the same direction of choice: up, right, down, or left. If a tile cannot advance in that direction (there is no free space available), then it stays put in place.

The 2048 board (a screenshot from the original game)

When two tiles having the same value touch (or rather, attempt to move on top of one another), they merge into one and sum up, increasing the tile nominal to a next power of two. So the progression looks like this: 2, 4, 8, 16, ... , 2048 and so on; programmers usually find this sequence familiar. After each turn, another 2 tile is spawned in a random empty space.

The original version of 2048 also sometimes creates...