Skip to content

Commit

Permalink
Merge pull request #126 from srcimon/jbs-daily
Browse files Browse the repository at this point in the history
HelloWorldExample is now even nicer
  • Loading branch information
srcimon committed Nov 29, 2023
2 parents 7779ef8 + 5f79f99 commit a4864a7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package io.github.srcimon.screwbox.examples.helloworld;

import static io.github.srcimon.screwbox.core.graphics.Color.random;
import static io.github.srcimon.screwbox.core.graphics.Pixelfont.defaultFont;

import io.github.srcimon.screwbox.core.Engine;
import io.github.srcimon.screwbox.core.ScrewBox;

import static io.github.srcimon.screwbox.core.graphics.Pixelfont.defaultFont;

public class HelloWorldExample {

public static void main(String[] args) {
Expand All @@ -13,7 +14,7 @@ public static void main(String[] args) {
screwBox.entities()
.add(engine -> {
var screen = engine.graphics().screen();
screen.drawTextCentered(screen.center(), "HELLO WORLD!", defaultFont(), 2);
screen.drawTextCentered(screen.center(), "HELLO WORLD!", defaultFont(random()), 2);
});

screwBox.start();
Expand Down

0 comments on commit a4864a7

Please sign in to comment.