Skip to content

A Python module to make speedcubing projects a piece of cake.

License

Notifications You must be signed in to change notification settings

Samuel-de-Oliveira/PyRubik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyRubik

PyRubik is python module create to assist the creation of speedcubing softwares made in Python. For example, if you are creating a speedcuber timer using Flask, this module may help you.

PyPI Progress

How to install

Well, this is easy. You must open your Python project and run this:

pip install pyrubik

Usage

The module has so many features. Just take a look:

Generate official WCA scrambles

This code generate a scramble for a 2x2x2 cube:

# This is a 2x2.py file
from PyRubik import Scramble

if __name__ == '__main__':
  scramble: list = Scramble.Cube2x2x2() # Create the scramble
  print(f'A 2x2x2 Scramble: {scramble}')   # Show it
# Your output must look similar like this:
A 2x2x2 Scramble: ['R2', "F'", 'R2', 'F', "R'", 'U', 'R2', 'U', "F'"]

This another one generate for 3x3x3 cube, but without the list syntax

# This is a 3x3.py file
from PyRubik import Scramble

if __name__ == '__main__':
  scramble: list = Scramble.Cube3x3x3() # Create the scramble

  # Show it
  for move in scramble:
      print(move, end='  ')
  print()
# Your output must look similar like this
U  L  U2  F'  U'  D'  F2  U'  F  L'  R  F2  B2  L2  R'  F  U'  B  F2  U'  F  B2  L  U

PyRubik docs

You can get the project documentation right here.


Made with ❤️ in Brazil 🇧🇷

About

A Python module to make speedcubing projects a piece of cake.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages