https://gitlab.com/christosangel/tui-mines

tui mines is evidently a text-based user interface implimentation of the classic mine sweeping puzzle game.

The user has to clear a board, square by square, flagging the squares suspected to hide mines on the way.

If the user opens a mine square, things go KABOOM! and the game is lost.

The user uses hints from the numbered squares. This numbers how many bombs are touching that square in every direction ( 8 in total).

Through logic, and a bit of luck, the player ends up clearing all the squares, while flagging all the mines.

  • @uranibaba
    link
    89 months ago

    Is it possible to use wasd instead of hjkl? I’m not old enough for that.

    • christosOP
      link
      119 months ago

      Here is the solution just for you:

      • get to the tui-mines/ directory
      • open a terminal there
      • run this command sed -i 's/k|A/w|A/;s/h|D/a|D/;s/j|B/s|B/;s/l|C/d|C/' tui-mines.sh

      Run the script ./tui-mines.sh

      You can now play using lower case awsd.

      • @uranibaba
        link
        29 months ago

        Haven’t had the time to use my computer yet, but I will update you soon. ™️

    • christosOP
      link
      79 months ago

      IMPORTANT UPDATE: Since many youngsters who unlike me, a senior citizen, live on the edge and hate vim keys or arrow keys, have requested an alternative navigation keys set up, I have just implemented a configuration option that satisfies just that.

      By editing the config file (either within the application or just editing ~/.config/tui-mines/tui-mines.config, and changing the NAVIGATION_KEYS value from vim+arrows (default) to aswd+arrows, the user can use the aswd keys to navigate in the game grid, just as requested.

      No other commands or hacks are needed.

      Arrow keys remain hardcoded, because they remind me of my youth, as an archer, during the Peloponnesian War

    • christosOP
      link
      29 months ago

      Let me know if it works.

    • christosOP
      link
      29 months ago

      And to see the correct cheatsheet as well: sed -i 's/hjkl/awsd/' tui-mines.sh

    • christosOP
      link
      29 months ago

      Wait up, I am preparing one command for you, you run it, and you use your keys as you wish. Just don’ put caps lock!

    • @gaael
      link
      1
      edit-2
      9 months ago

      From the gitlab page:

      The user can move the cursor with h,j,k,l (vim keys), or the arrow keys.

    • christosOP
      link
      19 months ago

      It is not impossible. Are you up to modify 4 lines of code?