Adds random flips/underlines to rows for a better FPS test.
package com.valkryst.VTerminal.samples;
+import com.valkryst.VTerminal.AsciiString;
import com.valkryst.VTerminal.Panel;
import com.valkryst.VTerminal.builder.PanelBuilder;
import com.valkryst.VTerminal.font.Font;
@@ -8,6 +9,7 @@ import com.valkryst.VTerminal.font.FontLoader;
import java.awt.Color;
import java.io.IOException;
import java.net.URISyntaxException;
+import java.util.concurrent.ThreadLocalRandom;
public class SampleFPS {
public static void main(final String[] args) throws IOException, URISyntaxException, InterruptedException {
@@ -34,6 +36,13 @@ public class SampleFPS {
temp = 45;
}
+ // Random Flips & Underlines:
+ for (final AsciiString string : panel.getScreen().getStrings()) {
+ string.setFlippedVertically(ThreadLocalRandom.current().nextBoolean());
+ string.setFlippedHorizontally(ThreadLocalRandom.current().nextBoolean());
+ string.setUnderlined(ThreadLocalRandom.current().nextBoolean());
+ }
+
final long bef = System.currentTimeMillis();
panel.draw();
