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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cube_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.14.4

File hashes

Hashes for cube_model-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c43cc6a74f391e2d4f8186c9afde4cab5702537951b6e943c35f89fee294fcd6
MD5 7ff401bb1d238c9ff7b918125fd3749d
BLAKE2b-256 2f76c135d21421f2db02ba3797fb28da82ac1035c14b4fd9ca535308d9a3f112

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cube_model-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a3afa7c15cbf2a922e6b0654bf43c317d1414b2fafb4f8430904aeff6714a6b4
MD5 6424272f0a08da513d55dfa9489c00ea
BLAKE2b-256 c6bfbb012fa0fe182e7e503b710e93d441007c7a2f0f1cf076f8627fadf5708b

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