forked from bryanjiang117/Teamfight-Tactics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTFT.java
43 lines (40 loc) · 1.17 KB
/
TFT.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.Arrays;
import java.io.*;
public class TFT{
public static JFrame frame;
public static Container container;
public static void main(String[] args){
frame = new JFrame("Teamfight Tactics");
container = frame.getContentPane();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
LoadMenu();
}
public static void LoadMenu(){
container.removeAll();
Menu menu = new Menu();
container.add(menu,BorderLayout.CENTER);
frame.revalidate();
frame.repaint();
frame.pack();
}
public static void LoadGame() throws FileNotFoundException{
container.removeAll();
Player player = new Player();
Board board = new Board(player);
container.add(board, BorderLayout.CENTER);
container.add(new SouthPanel(player, board), BorderLayout.SOUTH);
container.add(new EastPanel(board), BorderLayout.EAST);
frame.pack();
}
public static void LoadInstructions(){
container.removeAll();
InstructionPanel panel = new InstructionPanel();
container.add(panel, BorderLayout.CENTER);
frame.revalidate();
frame.repaint();
}
}