Linux/Unix desktop fun: Bastet Tetris(r) clone with block-choosing AI for console

Posted on in Categories Linux Games, Open Source last updated August 18, 2017

Xkcd - hell
Xkcd – hell (credit XKCD)

Do you love the puzzle and Linux/Unix-like system? Command line? Try ncurses based Tetris clone which is harder than every other Tetris out there. From the project home page:

Have you ever thought Tetris(R) was evil because it wouldn’t send you that straight “I” brick you needed in order to clear four rows at the same time? Well Tetris(R) probably isn’t evil, but Bastet certainly is. >:-) Bastet stands for “bastard tetris”, and is a simple ncurses-based Tetris(R) clone for Linux. Unlike normal Tetris(R), however, Bastet does not choose your next brick at random. Instead, Bastet uses a special algorithm designed to choose the worst brick possible. As you can imagine, playing Bastet can be a very frustrating experience!


Install Bastet as per your Linux or Unix operating system.

Install Bastet on a Debian/Ubuntu/Mint Linux

Type the following apt-get command/apt command:
$ sudo apt-get install bastet
Sample outputs:

[sudo] password for vivek: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
The following NEW packages will be installed:
  bastet libboost-program-options1.62.0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 240 kB of archives.
After this operation, 812 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 stretch/main amd64 libboost-program-options1.62.0 amd64 1.62.0+dfsg-4 [159 kB]
Get:2 stretch/main amd64 bastet amd64 0.43-4+b2 [80.6 kB]
Fetched 240 kB in 3s (71.1 kB/s) 
Preconfiguring packages ...
Selecting previously unselected package libboost-program-options1.62.0:amd64.
(Reading database ... 115148 files and directories currently installed.)
Preparing to unpack .../libboost-program-options1.62.0_1.62.0+dfsg-4_amd64.deb ...
Unpacking libboost-program-options1.62.0:amd64 (1.62.0+dfsg-4) ...
Selecting previously unselected package bastet.
Preparing to unpack .../bastet_0.43-4+b2_amd64.deb ...
Unpacking bastet (0.43-4+b2) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Setting up libboost-program-options1.62.0:amd64 (1.62.0+dfsg-4) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Setting up bastet (0.43-4+b2) ...
Processing triggers for man-db ( ...
Processing triggers for hicolor-icon-theme (0.15-1) ...

Install Bastet on FreeBSD Unix

To install the port, run:
# cd /usr/ports/games/bastet/ && make install clean
To add the package, use the pkg command
# pkg install bastet

Install Bastet on OpenBSD Unix

Type the following pkg_add command:
$ doas pkg_add -v bastet

Install Bastet on macOS Unix

Type the following brew command:
$ brew install bastet

Getting started with bastet

Just type the command:
$ bastet

Fig.01: Evil falling block game
Fig.01: Evil falling block game

You can use the following keys to control the game:

DOWN moves the tetromino down (one single step)
LEFT moves the tetromino left
RIGHT moves the tetromino right
SPACE rotates CW
UP rotates CCW
ENTER drops the tetromino as far down as possible (hard drop)
P pauses the game
CTRL+C exits the game without any further prompt

Here is a sample session:

Gif.01: Bastet in action
Gif.01: Bastet in action

If you enjoyed this desktop fun app, you may also like to use the following apps on Linux:

  1. Terminal ASCII Aquarium
  2. Run Steam Locomotive On Your Desktop
  3. Let it Snow On Your Desktop
  4. Summon Swarms Of Penguins To Waddle About The Desktop
  5. Text Mode Box and Comment Drawing

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Leave a Comment