Rubik's Cube game needs no introduction, right? It is a 3-D combination puzzle game invented by Ernő Rubik, a Hungarian sculptor and professor of architecture, in 1974. It is one of the best puzzle game invented so far to enhance the problem-solving skills of the kids and adults. If you're one Rubik's Cube lover, you don't need to buy it online or from a shop. You can play it right from the Terminal. Meet NRubik, an N-Curses based, virtual Rubik's Cube written in Python. If you're a hardcore CLI user who lives on Terminal all day, NRubik will certainly make your time useful.
Table of Contents
Install NRubik
NRubik is nothing but a simple python script that works with both python2 and python3. It will work on most Unix-like operating systems that supports python 2 or python 3. So. make sure you have installed python in your system.
Installing NRubki is trivial. All you have to do is clone the repository, make it executable and place it in your /bin/ folder. It's that simple!
Git clone the NRubik repository:
$ git clone https://github.com/cheertarts/nrubik.git
The contents of NRubik's repository will be cloned in a directory called "nrubik" in your current working folder. cd into that directory:
$ cd nrubik
Make it executable:
$ chmod +x nrubik
To install globally, copy the executable file to /usr/bin/ folder:
$ sudo cp nrubik /usr/bin/
To install locally (this might not work depending on the machine), copy the executable file to $HOME/.local/bin/ folder:
$ cp nrubik $HOME/.local/bin/
That's it. NRubik has been installed. Now, it's time to solve the puzzle.
Play Rubik's Cube Game In Terminal
Type the following command to launch NRubik:
$ nrubik
You'll be pleased with a screen something like below.
As you can see in the screenshot, all options are self-explanatory.
There are 6 color faces:
- W - White
- Y - Yellow
- O - Orange (Magenta)
- R - Red
- G - Green
- B - Blue
You can turn them all with the given keybindings.
- W - Turn top clockwise
- X - Turn bottom clockwise
- A - Turn left clockwise
- D - Turn right clockwise
- S - Turn front clockwise
- E - Turn back clockwise
To hide/show the help section, press "H". To Mix up or scramble the faces, press "M". To quit this puzzle, press "Q". If you've solved Rubik's Cube already in real time, it might seem bit difficult to solve it virtually. Even though it is bit challenging, but possible to solve.
Have fun!
Resource:
Thanks for stopping by!
Help us to help you:
- Subscribe to our Email Newsletter : Sign Up Now
- Support OSTechNix : Donate Via PayPal
- Download free E-Books and Videos : OSTechNix on TradePub
- Connect with us: Reddit | Facebook | Twitter | LinkedIn | RSS feeds
Have a Good day!!