diff --git a/src/main/java/Snake/TextView.java b/src/main/java/Snake/TextView.java index f8adcc7..29746ac 100644 --- a/src/main/java/Snake/TextView.java +++ b/src/main/java/Snake/TextView.java @@ -4,6 +4,30 @@ import java.awt.*; public class TextView implements Drawable { + public enum AnchorType { Left, Center, Right }; + + private String text; + + private Point position; + + private boolean visible; + + private AnchorType anchor; + + public TextView(String text, Point position) + { + this(text, position, true); + } + + public TextView(String text, Point position, boolean visible) + { + this.text = text; + this.position = position; + this.visible = visible; + this.anchor = AnchorType.Center; + } + + @Override public void draw(Graphics g)