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.1.tar.gz (11.6 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.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rubik_model-1.0.1.tar.gz
  • Upload date:
  • Size: 11.6 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.1.tar.gz
Algorithm Hash digest
SHA256 3ed37c42085bb87ca42136b15a86002407aea3d1cba8c15bc1ae55c6413a34c3
MD5 e14d094ec38bb689975c2bcfbd0674fb
BLAKE2b-256 e21a989b479b5d4e239dc41199984a9f4ab3e7e10482109cb01850753454c4a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rubik_model-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c11070977683e2a5a1e27c7f72160a0f3cb83d01a12d0fe0468813d84516910
MD5 0c24d2eb506302f9f9be244bc49a00ad
BLAKE2b-256 ba13016b6a9da0c004209214f7a4cb40e4c4c88ffca6de024e511cd720b05c77

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