3D Rubik's Cube in Emacs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Akib Azmain Turja f2d198dece
Fix typo
2 months ago
COPYING Add COPYING 4 months ago
README.org Lower required Emacs version and elaborate README 3 months ago
cube-shuffled.png Add the game 4 months ago
cube.el Fix typo 2 months ago
cube.png Add the game 4 months ago

README.org

Cube - 3D Rubik's Cube in Emacs

Cube is a 3D Rubik Cube game. You can do whatever you want to do with the cube. Just install it and start with M-x cube.

/akib/emacs-cube/src/branch/master/cube.png /akib/emacs-cube/src/branch/master/cube-shuffled.png

Installation

Package

Cube is not available on any ELPA right now.

Quelpa

(quelpa '(cube :fetcher git
               :url "https://codeberg.org/akib/emacs-cube.git"))

Straight.el

(straight-use-package
 '(cube :type git :repo "https://codeberg.org/akib/emacs-cube.git"))

Manual

First, install Eagle as described in its README. Then put cube.el in your load-path.

Keybindings

To rotate any of the six faces clockwise, call one of the following commands:

Key Command
f cube-rotate-front
b cube-rotate-back
l cube-rotate-left
r cube-rotate-right
u cube-rotate-up
d cube-rotate-down

If you want to rotate counter-clockwise, give single prefix argument (C-u) or negative argument (-) before the command. To rotate twice, either press the key twice or press give numeric argument 2 (2) and press the key once.

To shuffle the cube randomly, press S (cube-shuffle). You can use a custom seed yourself by calling it with prefix argument and entering the seed.

If you have scrambled the cube but can't solve, press R (cube-reset) to reset the cube.

To rotate the whole cube, you have the following commands and keybindings:

Key Command
up cube-camera-rotate-up
down cube-camera-rotate-down
left cube-camera-rotate-left
right cube-camera-rotate-right
M-up cube-camera-rotate-clockwise
M-down cube-camera-rotate-counter-clockwise
C-p cube-camera-rotate-up
C-n cube-camera-rotate-down
C-b cube-camera-rotate-left
C-f cube-camera-rotate-right
M-p cube-camera-rotate-counter-clockwise
M-n cube-camera-rotate-clockwise
B cube-camera-rotate-show-back
SPC cube-camera-reset-rotation

If, for some reason, you want to render the cube again, press g (cube-render).

FAQ

The cube too big.

Increase camera distance by increasing the value of cube-camera-distance.

The cube is too slow.

Decrease resolution by setting cube-resolution. This will decrease the size of the cube, so you may want to increase the scale by increasing cube-scale.

The pixels are too big.

Increasing resolution by setting cube-resolution, or decrease scaling by setting cube-scale.

The animation is too long.

Decrease animation duration by setting cube-animation-duration. If this doesn't help then may be the number of animation step is too much to show in given time. In that case you need to decrease animation step by setting cube-animation-steps, or you may decrease resolution.