troblo, a simple match-three terminal game (Bash)
from christos@lemmy.world to linux@lemmy.ml on 14 Mar 00:17
https://lemmy.world/post/26801936

cross-posted from: lemmy.world/post/26801933

https://gitlab.com/christosangel/troblo

troblo is a terminal match-three game, written in Bash.

The aim is to place each time a pair of new tiles with fixed orientation on available empty squares of the 6x6 grid, in order to create rows or columns of three or more matching tiles, which will become empty again.

The new pair of fixed orientation tiles is shown each time at the right side of the grid.

The new pair can be placed only if both selected squares are empty.

The game ends when the grid becomes so clogged with unmatching tiles, and there is no place in the grid to drop the new fixed orientation (horizontal or vertical) pair of tiles.

This game was inspired by https://368chickens.com/.

#linux

threaded - newest

some_guy@lemmy.sdf.org on 14 Mar 00:31 collapse

I love projects like this. It’s way harder to do in Bash, but that’s what makes it interesting. The unnecessary effort to do it right shows real skill.

christos@lemmy.world on 14 Mar 00:36 collapse

Thx for the feedback, I hope you enjoy it.

Badabinski@kbin.earth on 14 Mar 14:37 collapse

If you want to make things even more spicy, try doing in pure bash with no external process calls. Things like cat are trivial to replace. I saw some uses of sort that might be more difficult, but it wouldn't surprise me if newer Bash versions had a way to sort arrays nicely.