little ajustements
This commit is contained in:
parent
2aabc3b0f1
commit
21ff8c1b01
|
|
@ -14,13 +14,10 @@ public class Board {
|
|||
ArrayList<int[]> highlightedSquares = new ArrayList<>();
|
||||
private boolean pawnDoubleStep;
|
||||
private int xCoordinatePawn;
|
||||
private int yCoordinatePawn;
|
||||
//<<<<<<< HEAD
|
||||
private boolean enPassant;
|
||||
//=======
|
||||
private int yCoordinatePawn;
|
||||
private boolean enPassant;
|
||||
private boolean isGameOver = false;//flag for when a king is checkmate and no moves can be made anymore
|
||||
//>>>>>>> branch 'master' of https://gitarero.ecam.fr/louise.berteloot/OOP_2A5_Project.git
|
||||
|
||||
|
||||
private ArrayList<Board> previousStates;
|
||||
|
||||
public Board(int colNum, int lineNum) {
|
||||
|
|
|
|||
|
|
@ -85,18 +85,18 @@ public class JPanelChessBoard extends JPanel {
|
|||
if (myGame == null) {
|
||||
// Display title before game starts
|
||||
g.setColor(Color.WHITE);
|
||||
g.setFont(g.getFont().deriveFont(48f)); // larger font size
|
||||
g.setFont(g.getFont().deriveFont(48f));
|
||||
String title = "Chess Project";
|
||||
int stringWidth = g.getFontMetrics().stringWidth(title);
|
||||
int x = (getWidth() - stringWidth) / 2;
|
||||
int y = getHeight() / 2;
|
||||
g.drawString(title, x, y);
|
||||
|
||||
g.setFont(g.getFont().deriveFont(24f)); // Smaller font for subtitle
|
||||
g.setFont(g.getFont().deriveFont(24f));
|
||||
String subtitle = "Groupe 2A5";
|
||||
int subtitleWidth = g.getFontMetrics().stringWidth(subtitle);
|
||||
int x2 = (getWidth() - subtitleWidth) / 2;
|
||||
int y2 = y + 40; // 40 pixels below the title, adjust spacing if needed
|
||||
int y2 = y + 40;
|
||||
g.drawString(subtitle, x2, y2);
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue