diff --git a/.classpath b/.classpath index fb50116..6c0f828 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,9 @@ + + + diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..f48f419 --- /dev/null +++ b/build.xml @@ -0,0 +1,90 @@ + + + simple example build file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/junit-4.10.jar b/lib/junit-4.10.jar new file mode 100644 index 0000000..bf5c0b9 Binary files /dev/null and b/lib/junit-4.10.jar differ diff --git a/src/img/blue.png b/src/img/blue.png deleted file mode 100644 index f1eb446..0000000 Binary files a/src/img/blue.png and /dev/null differ diff --git a/src/img/green.png b/src/img/green.png deleted file mode 100644 index fe1b4fb..0000000 Binary files a/src/img/green.png and /dev/null differ diff --git a/src/img/none.png b/src/img/none.png deleted file mode 100644 index 482d3ad..0000000 Binary files a/src/img/none.png and /dev/null differ diff --git a/src/img/red.png b/src/img/red.png deleted file mode 100644 index 54f8e4f..0000000 Binary files a/src/img/red.png and /dev/null differ diff --git a/src/img/yellow.png b/src/img/yellow.png deleted file mode 100644 index 7ed3687..0000000 Binary files a/src/img/yellow.png and /dev/null differ diff --git a/src/view/BoardPanel.java b/src/view/BoardPanel.java index 0a7eadd..0ed960c 100644 --- a/src/view/BoardPanel.java +++ b/src/view/BoardPanel.java @@ -51,28 +51,22 @@ public class BoardPanel extends JPanel implements Refreshable { } - public static final URL BLUE_ICON = ClassLoader - .getSystemResource("img/blue.png"); - - public static final URL GREEN_ICON = ClassLoader - .getSystemResource("img/green.png"); - public static final URL NONE_ICON = ClassLoader - .getSystemResource("img/none.png"); - public static final URL RED_ICON = ClassLoader - .getSystemResource("img/red.png"); - public static final URL YELLOW_ICON = ClassLoader - .getSystemResource("img/yellow.png"); - /** - * - */ + public static final URL BLUE_ICON = BoardPanel.class + .getResource("/img/blue.png"); + public static final URL GREEN_ICON = BoardPanel.class + .getResource("/img/green.png"); + public static final URL NONE_ICON = BoardPanel.class + .getResource("/img/none.png"); + public static final URL RED_ICON = BoardPanel.class + .getResource("/img/red.png"); + public static final URL YELLOW_ICON = BoardPanel.class + .getResource("/img/yellow.png"); + private static final long serialVersionUID = 1L; private final JLabel[][] board = new JLabel[Board.NUM_ROWS][Board.NUM_COLS]; private final Referee referee; - // private final ImageIcon[][] icons = new - // ImageIcon[Board.NUM_ROWS][Board.NUM_COLS]; - public BoardPanel(Referee ref) { referee = ref; setLayout(new GridLayout(Board.NUM_ROWS, Board.NUM_COLS)); diff --git a/test/model/BoardTest.java b/test/model/BoardTest.java new file mode 100644 index 0000000..de23422 --- /dev/null +++ b/test/model/BoardTest.java @@ -0,0 +1,11 @@ +package model; + +import org.junit.Test; + +public class BoardTest { + + @Test + public void testConstructor() { + new Board(); + } +}