Closed awwong1 closed 8 years ago
Added a string representation of the cube as output for Cubie and Cube str methods.
import pycuber as pc # Create a Cube object mycube = pc.Cube() # Randomizing rand_alg = pc.Formula().random() mycube(rand_alg) print(mycube) print(repr(mycube))
Output of print(mycube):
print(mycube)
[g][y][o] [b][y][r] [g][g][o] [w][o][y][r][r][y][g][b][g][w][b][r] [y][r][w][b][g][o][g][o][w][g][b][g] [y][r][r][w][o][y][b][r][w][o][w][b] [b][y][o] [y][w][w] [r][o][b]
To get the old functionality back of printing the actual colors to terminal, use print(repr(mycube))
print(repr(mycube))
Thanks! @awwong1
Added a string representation of the cube as output for Cubie and Cube str methods.
Output of
print(mycube)
:To get the old functionality back of printing the actual colors to terminal, use
print(repr(mycube))