Giter Club home page Giter Club logo

rubiks_cube's Introduction

rubiks_cube

A rubik's cube that runs in your terminal!

alt text

Compilation:

Depedencies: ncurses or curses

Use

make

to build on Linux.

On Windows, compilation can be done using a port of curses for Windows such as pdcurses.

To install, use

make install

Which will install the binary to /usr/bin by default and the license to /usr/share/licenses/rubiks_cube/LICENSE.

How to Use:

Start the application in a terminal. Make sure that the terminal is the correct size before starting the application, as you cannot resize the terminal during runtime as of now.

Controls

  • Press Left, Right, Up, Down, z, or Z to orient the cube
    • Left and Right rotate the cube around the y axis.
    • Up and Down rotate the cube around the x axis.
    • z and Z rotate the cube around the z axis.
  • Press f/F, b/B, l/L, r/R, u/U, or d/D to turn a face
    • f is forward, b back, l left, r right, u up, d down. Pressing Shift-face, ie F, B, L, R, U, or D will turn the face clockwise instead of counterclockwise.
  • Press Space to align the cube with the camera's perspective.
  • Press m to access the menu
    • The menu allows you to scramble the cube, save, load, or quit
    • An empty seed to the cube scrambler sets the seed to a random seed.

Feedback is welcome!

Possible upcoming features

  • The ability to use any nxn cube
  • An automatic, efficient solver

rubiks_cube's People

Contributors

been-jamming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rubiks_cube's Issues

ncurses.h and curses.h not found

Here's what I got. Is this a bug or I did something wrong?

root@ubuntu:~ 
➜ git clone --recurse-submodules https://github.com/been-jamming/rubiks_cube.git
Cloning into 'rubiks_cube'...
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 22 (delta 7), reused 13 (delta 4), pack-reused 0
Unpacking objects: 100% (22/22), done.
Submodule 'CAM-curses-ascii-matcher' (https://github.com/been-jamming/CAM-curses-ascii-matcher) registered for path 'CAM-curses-ascii-matcher'
Cloning into '/root/rubiks_cube/CAM-curses-ascii-matcher'...
remote: Enumerating objects: 118, done.        
remote: Counting objects: 100% (118/118), done.        
remote: Compressing objects: 100% (88/88), done.        
remote: Total 118 (delta 69), reused 72 (delta 30), pack-reused 0        
Receiving objects: 100% (118/118), 31.95 KiB | 47.00 KiB/s, done.
Resolving deltas: 100% (69/69), done.
Submodule path 'CAM-curses-ascii-matcher': checked out '72e71e255be2c5ba24e33406bcd8ed5c892afab9'

root@ubuntu:~cd rubiks_cube 

root@ubuntu:~/rubiks_cube [master ✔ a6e7246]
➜ make
gcc 3d.c CAM-curses-ascii-matcher/CAM.c -Wall -Ofast -ffast-math -lm -lncurses -o rubiks_cube
3d.c:5:10: fatal error: ncurses.h: No such file or directory
 #include <ncurses.h>
          ^~~~~~~~~~~
compilation terminated.
CAM-curses-ascii-matcher/CAM.c:4:10: fatal error: curses.h: No such file or directory
 #include <curses.h>
          ^~~~~~~~~~
compilation terminated.
Makefile:2: recipe for target 'default' failed
make: *** [default] Error 1

root@ubuntu:~/rubiks_cube [master ✔ a6e7246]
➜ 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.