Search in sources :

Example 1 with AllSeparableMinoFactory

use of searcher.pack.separable_mino.AllSeparableMinoFactory in project solution-finder by knewjade.

the class SeparableMinos method createSeparableMinos.

public static SeparableMinos createSeparableMinos(MinoFactory minoFactory, MinoShifter minoShifter, SizedBit sizedBit, long deleteKeyMask) {
    AllSeparableMinoFactory factory = new AllSeparableMinoFactory(minoFactory, minoShifter, sizedBit.getWidth(), sizedBit.getHeight(), deleteKeyMask);
    Set<SeparableMino> separableMinos = factory.create();
    return new SeparableMinos(separableMinos);
}
Also used : SeparableMino(searcher.pack.separable_mino.SeparableMino) AllSeparableMinoFactory(searcher.pack.separable_mino.AllSeparableMinoFactory)

Example 2 with AllSeparableMinoFactory

use of searcher.pack.separable_mino.AllSeparableMinoFactory in project solution-finder by knewjade.

the class SeparableMinosTest method createSeparableMinoSet.

private Set<SeparableMino> createSeparableMinoSet() {
    Randoms randoms = new Randoms();
    MinoFactory minoFactory = new MinoFactory();
    MinoShifter minoShifter = new MinoShifter();
    int fieldHeight = randoms.nextIntClosed(1, 10);
    int fieldWidth = randoms.nextIntClosed(1, 4);
    SizedBit sizedBit = new SizedBit(fieldWidth, fieldHeight);
    AllSeparableMinoFactory separableMinoFactory = new AllSeparableMinoFactory(minoFactory, minoShifter, sizedBit.getWidth(), sizedBit.getHeight(), sizedBit.getFillBoard());
    return separableMinoFactory.create();
}
Also used : Randoms(lib.Randoms) MinoFactory(core.mino.MinoFactory) AllSeparableMinoFactory(searcher.pack.separable_mino.AllSeparableMinoFactory) MinoShifter(core.mino.MinoShifter) AllSeparableMinoFactory(searcher.pack.separable_mino.AllSeparableMinoFactory)

Aggregations

AllSeparableMinoFactory (searcher.pack.separable_mino.AllSeparableMinoFactory)2 MinoFactory (core.mino.MinoFactory)1 MinoShifter (core.mino.MinoShifter)1 Randoms (lib.Randoms)1 SeparableMino (searcher.pack.separable_mino.SeparableMino)1