Glusk / sprouts

A multi-platform implementation of Sprouts, built with libGDX.
MIT License
1 stars 1 forks source link

Only one sample point is needed to establish a direction. #72

Closed Glusk closed 5 years ago

Glusk commented 5 years ago

PresetSubmove.java should be modified in direction():

-if (strokePoints.size() < 2) {
+if (strokePoints.isEmpty()) {
    throw
        new IllegalStateException(
-           "At least 2 sample points are needed to establish a "
+           "At least 1 sample point is needed to establish a "
            + "direction!"
        );
}

The change should be propagated in the for loop.