diff --git a/ConnectFour/ConnectFour.iml b/ConnectFour/ConnectFour.iml deleted file mode 100644 index c90834f..0000000 --- a/ConnectFour/ConnectFour.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/ConnectFour/res/redChip.png b/ConnectFour/res/redChip.png deleted file mode 100644 index d446d3a..0000000 Binary files a/ConnectFour/res/redChip.png and /dev/null differ diff --git a/ConnectFour/res/yellowChip.png b/ConnectFour/res/yellowChip.png deleted file mode 100644 index f77f0ab..0000000 Binary files a/ConnectFour/res/yellowChip.png and /dev/null differ diff --git a/ConnectFour/src/Board.java b/ConnectFour/src/Board.java deleted file mode 100644 index 26b643e..0000000 --- a/ConnectFour/src/Board.java +++ /dev/null @@ -1,42 +0,0 @@ -import javax.swing.*; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -public class Board extends JPanel implements ActionListener { - - private final int DELAY = 15; - private final int BOARD_W = 700; - private final int BOARD_H = 600; - private boolean isInitialized = false; - - private Painter painter; - private Timer timer; - - public Board(){ - initBoard(); - initGame(); - } - - private void initBoard(){ - setPreferredSize(new Dimension(BOARD_W,BOARD_H)); - setBackground(Color.LIGHT_GRAY); - } - - private void initGame(){ - painter = new Painter(); - timer = new Timer(15, this); - timer.start(); - } - - @Override - public void actionPerformed(ActionEvent e) { - repaint(); - } - - @Override - protected void paintComponent(Graphics g) { - super.paintComponent(g); - painter.paintBoard(g, BOARD_W, BOARD_H); - } -} diff --git a/ConnectFour/src/Executor.java b/ConnectFour/src/Executor.java deleted file mode 100644 index f73a6d7..0000000 --- a/ConnectFour/src/Executor.java +++ /dev/null @@ -1,21 +0,0 @@ -import javax.swing.*; - -public class Executor extends JFrame { - - public Executor(){ - initUI(); - } - - private void initUI(){ - Board board = new Board(); - add(board); - pack(); - setDefaultCloseOperation(EXIT_ON_CLOSE); - setLocationRelativeTo(null); - } - - public static void main(String[] args) { - Executor executor = new Executor(); - executor.setVisible(true); - } -} diff --git a/ConnectFour/src/Game.java b/ConnectFour/src/Game.java deleted file mode 100644 index f7e8986..0000000 --- a/ConnectFour/src/Game.java +++ /dev/null @@ -1,2 +0,0 @@ -public class Game { -} diff --git a/ConnectFour/src/Painter.java b/ConnectFour/src/Painter.java deleted file mode 100644 index 03e9250..0000000 --- a/ConnectFour/src/Painter.java +++ /dev/null @@ -1,64 +0,0 @@ -import javax.swing.*; -import java.awt.*; -import java.awt.image.ImageObserver; - -public class Painter { - - private int board_w, board_h, tileWidth, tileHeight; - - public Painter(int width, int height){ - board_w = width; - board_h = height; - tileWidth = width/7; - tileHeight = height/6; - } - - private Color holeBlue = new Color(61, 209, 165); - - public void paintBoard(Graphics g){ - Graphics2D g2d = (Graphics2D) g; - g2d.setStroke(new BasicStroke(2)); - for (int i = 0; i < board_w/tileWidth; i++){ - for (int j = 0; j < board_h/tileHeight; j++){ - g2d.setColor(holeBlue); - g2d.fillOval(i * tileWidth + 10, j * tileHeight + 5, tileWidth - 15, tileHeight - 20); - g2d.setColor(Color.BLACK); - g2d.drawOval(i * tileWidth+ 10 , j * tileHeight+5, tileWidth - 15, tileHeight - 20); - } - } - } - - public void paintYellowChip(Graphics g){ - Graphics2D g2d = (Graphics2D) g; - g.drawImage(new redChip().getRedChip(), 0,0, g); - } - - class redChip{ - private ImageIcon imageIcon; - private Image redChip; - private String path = "../res/redChip.png"; - public redChip(){ - imageIcon = new ImageIcon(path); - redChip = imageIcon.getImage().getScaledInstance(tileWidth, tileHeight, 0); - } - - public Image getRedChip() { - return redChip; - } - } - - class yellowChip{ - private ImageIcon imageIcon; - private Image redChip; - private String path = "../res/yellowChip.png"; - public yellowChip(){ - imageIcon = new ImageIcon(path); - redChip = imageIcon.getImage().getScaledInstance(tileWidth, tileHeight, 0); - } - - public Image getRedChip() { - return redChip; - } - } - -} diff --git a/out/production/ConnectFour/Board.class b/out/production/ConnectFour/Board.class deleted file mode 100644 index d567cfd..0000000 Binary files a/out/production/ConnectFour/Board.class and /dev/null differ diff --git a/out/production/ConnectFour/Executor.class b/out/production/ConnectFour/Executor.class deleted file mode 100644 index 72af857..0000000 Binary files a/out/production/ConnectFour/Executor.class and /dev/null differ diff --git a/out/production/ConnectFour/Game.class b/out/production/ConnectFour/Game.class deleted file mode 100644 index 69e7f7b..0000000 Binary files a/out/production/ConnectFour/Game.class and /dev/null differ diff --git a/out/production/ConnectFour/Painter.class b/out/production/ConnectFour/Painter.class deleted file mode 100644 index f16f017..0000000 Binary files a/out/production/ConnectFour/Painter.class and /dev/null differ