Initial commit
This commit is contained in:
20
Display.java
Normal file
20
Display.java
Normal file
@@ -0,0 +1,20 @@
|
||||
import javax.swing.*;
|
||||
|
||||
public class Display {
|
||||
public static void main(String[] args) {
|
||||
int boardWidth = 400;
|
||||
int boardHeight = 400;
|
||||
int tileSize = 20;
|
||||
|
||||
JFrame game = new JFrame();
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user