Skip to main content

Orientation-independent Rubik cube model in strictly typed Python

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

rubik-model

An orientation-independent Rubik's cube model in strictly typed Python.

Highlights

  • Strict typing (mypy --strict)
  • Orientation-independent cube state
  • Color and Side are enums
  • CornerSticker objects form circular linked lists of size 3
  • EdgeSticker objects form circular linked lists of size 2
  • Cube.next_edge and Cube.next_corner encode clockwise sticker order on faces

Install

pip install rubik-model

Example

from rubik_model import Color, Move, Multiplicity, Side, solved, move

cube = solved()
assert cube.front_color is Color.GREEN

move(Move(Side.FRONT, Multiplicity.CW), cube)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rubik_model-1.0.3.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rubik_model-1.0.3-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file rubik_model-1.0.3.tar.gz.

File metadata

  • Download URL: rubik_model-1.0.3.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for rubik_model-1.0.3.tar.gz
Algorithm Hash digest
SHA256 aad4d8da5518f0194f62e14f6f176af27d9eaaffcc5004f24a52a15918121594
MD5 e7a7aba5d840f76339edc4d8a1876047
BLAKE2b-256 64d424fe7d22620db4184201b22e8d2981a8f85b8a643a68f9d8cbbcc4d4865f

See more details on using hashes here.

File details

Details for the file rubik_model-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: rubik_model-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for rubik_model-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2f018254fbf95aab609323c2e66d7c42f07eb4fef504247ac3220c1455b9d4df
MD5 a5e60ceac944d6206031f06350af8ef6
BLAKE2b-256 5231e0c3aa3862b35593b113fdd8fa9720a86cd2a97e77b16f17c7df2563aebe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page