smithers.twisty
Interface StickerSwappingTwistyPuzzle

All Superinterfaces:
TwistyPuzzle
All Known Implementing Classes:
RubiksCube

public interface StickerSwappingTwistyPuzzle
extends TwistyPuzzle

Extends the TwistyPuzzle interface to include new methods for twisty puzzles for which a twist simply swaps stickers around. For instance, a Rubik's Cube is such a puzzle, but a Square One is not.


Method Summary
 int getLocation(int index)
          Gets the index of the sticker which originated in the current location of the specified sticker.
 int getSticker(int loc)
          Gets the index of the sticker currently in the specified location.
 
Methods inherited from interface smithers.twisty.TwistyPuzzle
getColor, getPolygon, getScale, getTwist, isSolved, scramble, stickerCount, twist
 

Method Detail

getLocation

int getLocation(int index)
Gets the index of the sticker which originated in the current location of the specified sticker.

Parameters:
index - the sticker
Returns:
the location
See Also:
getSticker(int)

getSticker

int getSticker(int loc)
Gets the index of the sticker currently in the specified location. The location is specified by the index of the sticker which originated there.

Parameters:
loc - the location
Returns:
the sticker's index
See Also:
getLocation(int)