A console application that simulates a 3x3 Rubik's cube with the ability to perform standard face rotations.
- Accurate simulation of a 3x3 Rubik's cube
- Implementation of all standard face rotations (clockwise and counter-clockwise)
- Console-based visualization showing the state of the cube
- Proper edge and corner piece tracking during rotations
- .NET 6.0 SDK or higher
- Windows PC
- Clone this repository
- Open a command prompt in the project directory
- Run
dotnet build
- After building, run
dotnet runin the project directory - The application will:
- Display the initial solved cube state
- Apply the rotation sequence: F R' U B' L D'
- Display the final cube state after rotations
The cube uses a coordinate system where each position on a face is identified by [row, column] coordinates:
Figure 1: Coordinate system for each face of the cube
The application produces an output showing the state of the cube after applying the specified rotations:
Figure 2: Console output showing the solved cube and the cube after rotations
The application has been thoroughly tested using:
-
Unit Tests: A comprehensive suite of unit tests verifies the correctness of:
- Individual face rotations (both clockwise and counter-clockwise)
- Edge piece transfers between faces
- Proper state maintenance through multiple rotations
-
Verification Methods:
- Confirmed that applying a rotation followed by its inverse returns the cube to its original state
- Validated that corner and edge pieces maintain their relationships during rotations
- Compared the results of the specified rotation sequence (F R' U B' L D') with a reference implementation (https://rubiks-cube-solver.com/)
The testing approach ensures that the simulator accurately represents a physical Rubik's Cube in all aspects of its behavior.

