This repository contains a program in C# for solving the Rubik's Cube. The program is designed to be run via the console.
- Clone this repository to your machine.
- Navigate to the
Rubik's Cube Consoledirectory. - Run the
Program.csfile.
When you run Program.cs, you have three choices:
-
Generate a random cube scramble:
Type1in the terminal to generate a random cube scramble. You will also be prompted to provide the number of moves in the scramble you desire. For example, if you enter500, the cube will be well scrambled, while entering3will result in less scrambling. -
Enter your own cube scramble:
You can enter your own cube scramble to solve. Each line should represent a single move. For example:
R
F
B'
U
...
Use 0 or leave the line blank to validate the scramble.
- Enter a custom Rubik's Cube:
You can directly enter a Rubik's Cube configuration. The order of the faces does not matter. Each face should be represented as a sequence of 9 colors, where the colors are denoted by the first letter of their English names (Y for Yellow, W for White, B for Blue, O for Orange, G for Green, R for Red). For example:
YOORWYOGWOYWWYWWBRBORORYBORRGWRGBOGYBBYGBWGBYGWBROYGRG
Pay attention to the white and yellow faces; the other four faces are identical, with this order :

This project is licensed under the MIT License. See the LICENSE file for details.