Skip to content

Commit

Permalink
Updated class placement
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron committed Mar 30, 2016
1 parent 9b6b841 commit 6d28637
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/view/CheckersCanvas.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import javax.swing.JPanel;

import model.Board;
import test.Square;

public class CheckersCanvas extends JPanel {

Expand All @@ -31,7 +30,7 @@ public CheckersCanvas() {
public void initSquares() {
for (int i = 0; i < BOARD_DIM; ++i) {
if (i % 2 == 0) {
for (int j = 0; j < BOARD_DIM/4; ++j) {
for (int j = 0; j < BOARD_DIM/2; ++j) {
Square black = new Square(Color.BLACK, i, j*2);
Square red = new Square(Color.RED, i, j*2 + 1);
this.add(black);
Expand All @@ -40,7 +39,7 @@ public void initSquares() {
redSquares.add(red);
}
} else {
for (int j = 0; j < BOARD_DIM/4; ++j) {
for (int j = 0; j < BOARD_DIM/2; ++j) {
Square black = new Square(Color.BLACK, i, j*2 + 1);
Square red = new Square(Color.RED, i, j*2);
this.add(red);
Expand Down
2 changes: 1 addition & 1 deletion src/test/Square.java → src/view/Square.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test;
package view;

import java.awt.Color;

Expand Down

0 comments on commit 6d28637

Please sign in to comment.