This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
connect-four/src/de/itsblue/ConnectFour/ConnectFour.java

48 lines
1,008 B
Java
Raw Normal View History

2020-02-05 15:01:40 +01:00
package de.itsblue.ConnectFour;
2020-02-05 15:01:40 +01:00
import java.awt.Dimension;
import javax.swing.JFrame;
import de.itsblue.ConnectFour.GameBoard;
import de.itsblue.ConnectFour.Plate.PlateType;
2020-02-05 15:01:40 +01:00
public class ConnectFour extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void setTitle(String name) {
super.setTitle(name);
}
2020-02-05 15:01:40 +01:00
ConnectFour() {
// Constructor
// initialize window
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setTitle("Connect 4");
this.setPreferredSize(new Dimension(600, 600));
2020-02-05 15:29:52 +01:00
GameBoard board = new GameBoard();
board.setPreferredSize(new Dimension(600,600));
this.add(board);
board.insertPlate(new Plate(PlateType.O), 0);
2020-02-05 15:01:40 +01:00
// finish up
this.pack();
this.setVisible(true);
}
2020-02-05 15:29:52 +01:00
public static void main(final String[] args) {
2020-02-05 15:01:40 +01:00
System.out.println(new ConnectFour());
2020-02-05 15:01:40 +01:00
}
}