use of common.tetfu.Tetfu in project solution-finder by knewjade.
the class DevRandomEntryPoint method getTetfu.
private ColoredField getTetfu(MinoFactory minoFactory, ColorConverter converter) throws FinderParseException {
if (!code.isEmpty()) {
Tetfu tetfu = new Tetfu(minoFactory, converter);
String removeDomainData = Tetfu.removeDomainData(code);
String data = Tetfu.removePrefixData(removeDomainData);
List<TetfuPage> decode = tetfu.decode(data);
TetfuPage lastPage = decode.get(decode.size() - 1);
return lastPage.getField();
}
return new ArrayColoredField(Tetfu.TETFU_MAX_HEIGHT);
}
use of common.tetfu.Tetfu in project solution-finder by knewjade.
the class MoveSettingParser method encodeTetfu.
private List<TetfuPage> encodeTetfu(String encoded) throws FinderParseException {
MinoFactory minoFactory = new MinoFactory();
ColorConverter colorConverter = new ColorConverter();
Tetfu tetfu = new Tetfu(minoFactory, colorConverter);
String data = Tetfu.removePrefixData(encoded);
if (data == null)
throw new FinderParseException("Unsupported tetfu: data=" + encoded);
return tetfu.decode(data);
}
Aggregations