A Rubik’s Cube is a 3-dimensional puzzle invented in 1974 by Ernő Rubik. The cube comprises 26 miniature cubes (also known as “cubies” or “cubelets”) where the visible face(s) of each miniature cube is a different color and each face of the cube may be rotated independently of the others. When solved, each face of the cube must have only a single color.

Rubik's cube

Various algorithms exist to solve a Rubik’s Cube, but the focus of this assignment is modeling and visualizing a Rubik’s Cube so that someone can “play” with an electronic version.

Expected duration
6–8 hours
Deadline
2359 on Lesson 37
Points
75 points
Submission
Canvas

Learning Objectives

Implement software by following a specification

  • Analyze requirements for a software system
  • Develop code that adheres to a specified design
  • Use test-driven development (TDD) to emphasize simple design and software quality

Help Policy

Authorized Resources
Any, except others’ code and the author of the specification
Notes
Never copy another person’s work and submit it as your own

Do not jointly work on this assignment, but you may ask classmates syntax questions

You must document all help received from all sources, including the instructor and instructor-provided material (including the textbook), except the following:

  • Resources related to syntax unless the resource is a classmate (i.e., document any interactions you have with classmates)

Instructions

Use the provided link (distributed separately) to access the assignment in GitHub Classroom.

Implement the specification for modeling a Rubik’s Cube. Template code is provided to start your implementation.

Test code is provided to facilitate automated testing. Do not modify the test code! A correct implementation of the specification should pass all the automated tests.

Submission

Create an archive of your Git repository (you can use GitHub’s “Clone or download” button when viewing your repository for this purpose) and submit that archive to Canvas. Be sure to include your documentation statement as part of the submission.

GitHub Classroom also tags the latest commit at the due date for the assignment.

Grading

The following grading rubric will be used for this assignment:

Description Points
Unit Tests (16 @ 2 points each) 32
Integration Tests (6 @ 6 points each) 36
PEP 8 compliance 7

No partial credit will be awarded for individual tests, including PEP 8 compliance, unless you can prove that a test case is invalid (e.g., violates the specification).

Automated Tests

GitHub Actions tests your code when you push your changes to GitHub (i.e., continuous integration (CI)). The entire class shares the resources provided for auto-grading; more specifically, there is a maximum number of minutes per month for GitHub Actions, and each job counts toward that maximum. You should test locally before pushing to GitHub.

Because GitHub Actions resources are shared, each workflow run in excess of 25 will incur a 1-point penalty.

To encourage judicious use of shared resources, the aforementioned penalty will be applied to deter running an excessive number of jobs that don’t pass the tests. If you test locally, then you should have no trouble avoiding a penalty. You may check the number of workflow runs by clicking on the “Actions” tab of your repository.