CubeColorValidator class
Checks whether a cube's colouring could belong to a real, solvable 3x3 cube.
It verifies that centres are unchanged, that each piece has the right number of stickers with no duplicate or opposite colours, that every edge/corner colour combination physically exists, and that each colour appears exactly kStickersPerColor times.
Constructors
- CubeColorValidator()
-
Creates a validator.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
PuzzleCubeState cube) → CubeValidationResult -
Validates
cubeand returns the result.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- expectedStickerCountPerColor → const int
- How many times each colour must appear on a valid cube.