stickerCube {cubing}R Documentation

Create and Convert StickerCubes

Description

Creates, converts and tests for stickerCube objects.

Usage

getStickerCube(pattern = c("Solved","Superflip","EasyCheckerboard","Wire","PlusMinus",
  "Tablecloth","Spiral","SpeedsolvingLogo","VerticalStripes","OppositeCorners",
  "Cross","UnionJack","CubeInTheCube","CubeInACubeInACube","Anaconda","Python",
  "BlackMamba","GreenMamba","FourSpots","SixSpots","Twister","Kilt","Tetris",
  "DontCrossLine","Hi","HiAllAround","AreYouHigh","CUAround","OrderInChaos","Quote",
  "MatchingPictures","3T","LooseStrap","ZZLine","Doubler","CheckerZigzag",
  "ExchangedDuckFeet","StripeDotSolved","Picnic","PercentSign","Mirror",
  "PlusMinusCheck","FacingCheckerboards","OppositeCheckerboards","4Plus2Dots",
  "Rockets","Slash","Pillars","TwistedDuckFeet","RonsCubeInACube","Headlights",
  "CrossingSnake","Cage","4Crosses","Pyraminx","EdgeTriangle","TwistedRings",
  "ExchangedRings","TwistedChickenFeet","ExchangedChickenFeet","CornerPyramid",
  "TwistedPeaks","ExchangedPeaks","SixTwoOne","YinYang","YanYing","HenrysSnake",
  "TwistedCorners","QuickMaths"))
stickerCube(string)
as.stickerCube(aCube)
is.stickerCube(aCube)

Arguments

pattern

A character string giving a pattern for the returned cube. Approximately seventy different patterns are available. The default pattern is the solved cube. The patterns and names are derived from the ruwix.com website.

string

A character string representing the color on each cube sticker. The string must contain only the letters URFLBD, representing the color on each face, and may contain any amount of white space. There must be 9 occurrences of each letter, or 8 occurrences if the centre stickers are omitted. A character vector can also be given instead of a character string, with one element for each letter. The sticker template can be displayed using the code at the end of the Examples section below.

aCube

Any object.

Details

The is.stickerCube function returns TRUE for stickerCube objects and FALSE otherwise. The as.stickerCube function converts a cube object to a stickerCube object and returns an error for other arguments.

The getStickerCube function creates stickerCube objects using known patterns. The stickerCube function creates stickerCube objects using colors entered by the user. For alternative ways of creating stickerCube objects, see randCube and getMovesCube.

A stickerCube is a named character vector of length 54 where each element is one of the six letters URFLBD. The element named U5 is always equal to the character string U as this represents a centre sticker. The elements named R5 F5 L5 B5 D5 are similarly fixed.

The stickerCube function contains a large amount of bulletproofing to ensure the cube has valid cubies that are stickered correctly, but the cube may or may not be solvable. Both stickerCube and cubieCube objects are designed to hold both solvable and unsolvable cubes. You can test solvability with the is.solvable function.

Value

A logical value for is.stickerCube. A stickerCube object for all other functions.

See Also

getMovesCube, is.solvable, randCube, cubieCube

Examples

aCube <- getStickerCube("Wire")
bCube <- stickerCube("UUUUUUUUU RLLRRRLLR BBFFFFFBBD DDDDDDDDL RRLLLRRLF FBBBBBFF")
cCube <- stickerCube("FBBBUFRRB DUUFRUFFB DBRBFDUFLF RDDDLDDLU UFULLLLLR DRRBLURB")
identical(aCube, bCube)
is.stickerCube(aCube)

## Not run: plot(aCube)
## Not run: plot3D(aCube)
## Not run: plot(cCube)
## Not run: plot3D(cCube)

## Not run: plot(getStickerCube(), numbers = TRUE)
## Not run: plot(getStickerCube(), numbers = TRUE, blank = TRUE)

[Package cubing version 1.0-5 Index]