From dd498e15cdddb187b12c37c4dad4f09073cd9747 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Sat, 8 Apr 2023 23:46:27 +0200 Subject: [PATCH] Add interactiveness to HTML outputs. --- .../generator/renderer/html/HTMLRenderer.java | 112 +++++++++++++++++- 1 file changed, 107 insertions(+), 5 deletions(-) diff --git a/src/main/java/ch/fritteli/labyrinth/generator/renderer/html/HTMLRenderer.java b/src/main/java/ch/fritteli/labyrinth/generator/renderer/html/HTMLRenderer.java index fc03f38..c5b3aa6 100644 --- a/src/main/java/ch/fritteli/labyrinth/generator/renderer/html/HTMLRenderer.java +++ b/src/main/java/ch/fritteli/labyrinth/generator/renderer/html/HTMLRenderer.java @@ -5,7 +5,109 @@ import ch.fritteli.labyrinth.generator.renderer.Renderer; import lombok.NonNull; public class HTMLRenderer implements Renderer { - private static final String POSTAMBLE = ""; + + private static final String POSTAMBLE = ""; private HTMLRenderer() { } @@ -23,7 +125,7 @@ public class HTMLRenderer implements Renderer { } final Generator generator = new Generator(labyrinth); final StringBuilder sb = new StringBuilder(this.getPreamble(labyrinth)); - sb.append(""); + sb.append("
"); while (generator.hasNext()) { sb.append(generator.next()); } @@ -39,11 +141,12 @@ public class HTMLRenderer implements Renderer { "" + "" + "" + "" + "" + - "show solution"; + ""; } - }