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.

  • stephen@lemmy.today
    link
    fedilink
    English
    arrow-up
    2
    ·
    15 days ago

    The “MAGENTA” bricks are not magenta…

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

    • christos@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      15 days 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.