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.2.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.2-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rubik_model-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 8232c30126a414b0c06149963f1d2b37cb46df0b909453be7f1449c2dc0ebbf0
MD5 01a1fed41601557c312bdc22fb4c7f9d
BLAKE2b-256 46c734379a818928b586431579781b28fa1cef3e77dda49b5acbb73c8e397224

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rubik_model-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e36cb13e62ed0e25dd001f05a68814e1e1c9d1d63eb0dc2fb14bdd66eaf32345
MD5 2c9bedcfbeb822b21977c2fc6b1e87e2
BLAKE2b-256 e489aa0787fbfdd8a5515266aea37b5f48f2ec5e547cee5b11a6c387e9169021

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