this post was submitted on 11 Dec 2024
79 points (98.8% liked)

Linux

48665 readers
995 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

cross-posted from: https://lemmy.world/post/23017061

https://gitlab.com/christosangel/stackabrix

stackabrix is a simple terminal game, written in Bash, where the user, against the clock and with the least moves possible, must sort the blocks according to their color, and stack them in the respective stack.

During the game, the user can move left and right, pick blocks and drop them in other stacks.

The aim is to sort the blocks, and stack them in the respectively named stacks, fast as possible, and with the least moves possible.

The play's score is the sum of the time achieved in seconds and of the moves made.

If the score is among the 10 best scores achived, it makes it in the Top Ten Highscores.

win_game

Any feedback is welcome.

top 4 comments
sorted by: hot top controversial new old
[–] QuazarOmega@lemy.lol 4 points 1 week ago (1 children)

Now I can replay towers of Hanoi trauma in my favourite color scheme 😋

(Actually dig this BTW)

[–] christos@lemmy.world 2 points 1 week ago

😂 Say the word, Towers are just around the corner! 😂

[–] stephen@lemmy.today 2 points 1 week ago (1 children)

The “MAGENTA” bricks are not magenta…

The colors must be based on the color theme for the terminal?

[–] christos@lemmy.world 2 points 1 week ago

As things are at the moment, yes.

I was thinking of passing the color variables in the config file, through install.sh, but then, people would (rightfully) complain about colors not matching their terminal color theme.

I might do just that in the near future, leaving the terminal theme values as default.

If you wish to change color values, they are hardcoded in the load_colors function of stackabrix.sh, and sufficiently marked with comments, to know which is which.

A useful help for such a change would be https://talyian.github.io/ansicolors/.

Let me know if you need any help with these changes.