|
@ -16,7 +16,7 @@ public class Score extends Rectangle { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void draw(Graphics g) { |
|
|
public void draw(Graphics g) { |
|
|
g.setColor(Color.white); |
|
|
|
|
|
|
|
|
ScoreColor(g); |
|
|
g.setFont(new Font("Consolas", Font.BOLD,50)); |
|
|
g.setFont(new Font("Consolas", Font.BOLD,50)); |
|
|
g.drawLine(FRAME_WIDTH/2, 0, FRAME_WIDTH/2, FRAME_HEIGHT); |
|
|
g.drawLine(FRAME_WIDTH/2, 0, FRAME_WIDTH/2, FRAME_HEIGHT); |
|
|
g.drawOval((FRAME_WIDTH/2)-(COURT_CIRCLE/2), (FRAME_HEIGHT/2) - (COURT_CIRCLE/2), COURT_CIRCLE,COURT_CIRCLE); |
|
|
g.drawOval((FRAME_WIDTH/2)-(COURT_CIRCLE/2), (FRAME_HEIGHT/2) - (COURT_CIRCLE/2), COURT_CIRCLE,COURT_CIRCLE); |
|
@ -25,4 +25,8 @@ public class Score extends Rectangle { |
|
|
g.drawString(String.valueOf(player_2/10) + String.valueOf(player_2%10), (FRAME_WIDTH/2)+ 20, 50); |
|
|
g.drawString(String.valueOf(player_2/10) + String.valueOf(player_2%10), (FRAME_WIDTH/2)+ 20, 50); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static void ScoreColor(Graphics g) { |
|
|
|
|
|
g.setColor(Color.white); |
|
|
|
|
|
} |
|
|
} |
|
|
} |