Skip to main content

Orientation-independent cube model in strictly typed Python

Project description

cube-model

An orientation-independent 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 cube-model

Example

from cube_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

cube_model-1.0.4.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.

cube_model-1.0.4-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file cube_model-1.0.4.tar.gz.

File metadata

  • Download URL: cube_model-1.0.4.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Linux/6.6.114.1-microsoft-standard-WSL2

File hashes

Hashes for cube_model-1.0.4.tar.gz
Algorithm Hash digest
SHA256 021fada1427cda8edeb31c6a810571e183ecbea5a02e733ff23dbc7c46f05914
MD5 b61ca406dd20ad7c97f00718dc707949
BLAKE2b-256 b438f755142b10b4922cd353835385c4ce3adfbd428e13675e7464fcde9bc17d

See more details on using hashes here.

File details

Details for the file cube_model-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: cube_model-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Linux/6.6.114.1-microsoft-standard-WSL2

File hashes

Hashes for cube_model-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6584600d193bf23da1dc7979e8528d9848e783af2a2b46a55c7101dc51b4af27
MD5 32e7ccae548eaa6a3320a0174aa5ca6f
BLAKE2b-256 a4bf3800f9780a0a8a024cead9123aab5bf5b079c5170fb685b85caab62c51a3

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