package menus;

import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;

import snake.Screen;

public class GameOverMenu extends Menu {
  private String title;
  private Color titleColor;
  private Font font;
  private String score;

  public GameOverMenu(int score) {
    this.title = "GAME OVER";
    this.titleColor = new Color(255, 255, 255);
    this.font = new Font("Agency FB", Font.BOLD, 96);
    this.score = String.valueOf(score);
  }

  @Override
  public void render(Graphics2D g2d) {
    FontMetrics metrics = g2d.getFontMetrics(font);
    int titleWidth = metrics.stringWidth(title);
    int titleX = Screen.WIDTH / 2 - titleWidth / 2;
    int titleY = titleX;

    int scoreWidth = metrics.stringWidth(score);
    int scoreX = Screen.WIDTH / 2 - scoreWidth / 2;
    int scoreY = titleY + 100;

    g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

    g2d.setFont(font);
    g2d.setColor(titleColor);
    g2d.drawString(title, titleX, titleY);
    g2d.drawString(score, scoreX, scoreY);
  }
}

@@ -274,17 +274,48 @@
 te Font 
-f
+titleFont;%0A  private Font scoreF
 ont;%0A  p
@@ -458,17 +458,22 @@
    this.
-f
+titleF
 ont = ne
@@ -508,16 +508,76 @@
 D, 96);%0A
+    this.scoreFont = new Font(%22Agency FB%22, Font.PLAIN, 72);%0A
     this
@@ -680,17 +680,22 @@
 Metrics 
-m
+titleM
 etrics =
@@ -714,17 +714,22 @@
 Metrics(
-f
+titleF
 ont);%0A  
@@ -739,33 +739,38 @@
 nt titleWidth = 
-m
+titleM
 etrics.stringWid
@@ -858,11 +858,91 @@
 itle
-X;%0A
+Metrics.getHeight();%0A%0A    FontMetrics scoreMetrics = g2d.getFontMetrics(scoreFont);
 %0A   
@@ -959,17 +959,22 @@
 Width = 
-m
+scoreM
 etrics.s
@@ -1197,17 +1197,22 @@
 setFont(
-f
+titleF
 ont);%0A  
@@ -1282,16 +1282,44 @@
 itleY);%0A
+    g2d.setFont(scoreFont);%0A
     g2d.

Change game over score font size/weight