Browse Source

Add cell class

feature_TicTacToe_BasicPlayfield
kfkama 3 years ago
parent
commit
bb5e31ff9f
  1. 3
      src/main/java/TicTacToe/TicTacToeGame.java
  2. 13
      src/main/java/TicTacToe/cell.java

3
src/main/java/TicTacToe/TicTacToeGame.java

@ -4,6 +4,7 @@ import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.geom.Line2D; import java.awt.geom.Line2D;
import javax.swing.JButton;
import javax.swing.JFrame; import javax.swing.JFrame;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -13,12 +14,12 @@ public class TicTacToeGame extends JPanel {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static int width = 600, height = 600; private static int width = 600, height = 600;
public TicTacToeGame() { public TicTacToeGame() {
this.setSize(width, height); this.setSize(width, height);
} }
public static void main(String[] args) { public static void main(String[] args) {
JFrame f = new JFrame(); JFrame f = new JFrame();
TicTacToeGame ttt = new TicTacToeGame(); TicTacToeGame ttt = new TicTacToeGame();

13
src/main/java/TicTacToe/cell.java

@ -0,0 +1,13 @@
package TicTacToe;
import javax.swing.JButton;
public class cell extends JButton {
int value = 0;
public cell() {
}
}
Loading…
Cancel
Save