2020-05-20 09:19:33 +02:00

72 lines
1.8 KiB
Java

package ruscz.game.gameOfProd;
import ruscz.game.gameOfProd.LevelEditor.LevelEditor;
import ruscz.game.gameOfProd.LevelEditor.TilesetOverview;
import ruscz.game.gameOfProd.Windows.WindowOfBattle;
import ruscz.game.gameOfProd.Windows.WindowOfFreeMove;
import ruscz.game.gameOfProd.Windows.WindowOfMenu;
import javax.swing.*;
import java.awt.*;
public class Game extends JFrame {
private static final int WINDOW_WIDTH = 13;
private static final int WINDOW_HEIGHT = 13;
public static final int CELL_SIZE = 60;
private final WindowOfMenu menu;
private final WindowOfFreeMove freeMove;
private final WindowOfBattle battle;
private TilesetOverview tilesetOverview;
public WindowOfMenu getMenu() {
return menu;
}
public WindowOfFreeMove getFreeMove() {
return freeMove;
}
public WindowOfBattle getBattle() {
return battle;
}
public static void main(String[] args) {
new Game();
}
public Game() {
freeMove = new WindowOfFreeMove(this);
menu = new WindowOfMenu(this);
battle = new WindowOfBattle(this);
//tohle spustí na začátku menu
add(menu);
//tohle spustí na začátku hru
// add(freeMove);
// freeMove.start(true);
//tohle spustí na začátku bitvu
// add(battle);
// battle.startBattle();
//Tohle spustí na začátku tileset overview
// new LevelEditor();
setDefaultCloseOperation(EXIT_ON_CLOSE);
setUndecorated(true);
setBounds(0, 0, CELL_SIZE * WINDOW_WIDTH, CELL_SIZE * WINDOW_HEIGHT);
setLocationRelativeTo(null);
setResizable(false);
setVisible(true);
getContentPane().setBackground(Color.BLACK);
setExtendedState(MAXIMIZED_BOTH);
}
public Game game() {
return this;
}
}