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.

  • Bad_Company_Daps
    link
    fedilink
    arrow-up
    6
    ·
    19 hours ago

    Looks pretty cool. I know this isn’t the point but I feel like from a games perspective the scoring is a bit off. I don’t think 1 extra second and 1 extra move should be the same value. For me to sit there and analyze what the optimal move set would be to move set would be to move a certain block may avoid 2-3 extra moves, but would take way longer than 3 seconds for me to calculate in my head. Maybe make a move add 5 points to the score?

    I wonder if there’s a game theory way to find the optimal amount that the moves and time should be weighed to make them equal value.

    Either way, pretty awesome you got this working in bash.

    • christos@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      16 hours ago

      Summing up seconds and moves seemed a fair way to mark one’s score. The analogy of each in the sum is purely arbitrary, and quite possibly subjective: Some people play based more with their reflexes, muscle memory, than calculation. Not everyone functions the same. However this is a fair point. Thanks for the feedback.