use of common.tetfu.TetfuElement in project solution-finder by knewjade.
the class EasyTetfu method encodeUrl.
public String encodeUrl(Field initField, BlockField blockField) {
Tetfu tetfu = new Tetfu(minoFactory, colorConverter);
TetfuElement elementOnePage = parseBlockFieldToTetfuElement(initField, colorConverter, blockField, "");
return "http://fumen.zui.jp/?v115@" + tetfu.encode(Collections.singletonList(elementOnePage));
}
use of common.tetfu.TetfuElement in project solution-finder by knewjade.
the class DevRandomEntryPoint method run.
@Override
public void run() throws FinderException {
PatternGenerator generator = createBlockGenerator(pattern);
List<Pieces> blocks = generator.blocksStream().collect(Collectors.toList());
int index = new Random().nextInt(blocks.size());
Pieces selected = blocks.get(index);
String quiz = Tetfu.encodeForQuiz(selected.getPieces());
MinoFactory minoFactory = new MinoFactory();
ColorConverter converter = new ColorConverter();
ColoredField coloredField = getTetfu(minoFactory, converter);
Tetfu tetfu = new Tetfu(minoFactory, converter);
TetfuElement element = new TetfuElement(coloredField, quiz);
String encode = tetfu.encode(Collections.singletonList(element));
System.out.println("v115@" + encode);
}
Aggregations