Updated the project configuration to use Java 21 and run the game from the correct directory, resolving previous Java version conflicts and ensuring proper execution. Replit-Commit-Author: Agent Replit-Commit-Session-Id: f6819c21-e85d-45ac-acde-604db2cfa4fe Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: ed832e25-fc86-4753-8cfc-80cfabc64a02 Replit-Helium-Checkpoint-Created: true
22 lines
553 B
Java
22 lines
553 B
Java
import javax.swing.*;
|
|
|
|
public class Display {
|
|
public static void main(String[] args) {
|
|
int boardWidth = 800;
|
|
int boardHeight = 600;
|
|
int tileSize = 20;
|
|
|
|
JFrame game = new JFrame();
|
|
game.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
game.setSize(boardWidth, boardHeight);
|
|
game.setVisible(true);
|
|
game.setLocationRelativeTo(null);
|
|
game.setResizable(false);
|
|
|
|
Platformer platformer = new Platformer(boardWidth, boardHeight, tileSize);
|
|
game.add(platformer);
|
|
game.pack();
|
|
platformer.requestFocus();
|
|
}
|
|
}
|