Skip to content

Commit

Permalink
Board.init() now private and called in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron committed Mar 28, 2016
1 parent 80cc4bf commit 97a12bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/model/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public enum Direction {UP, DOWN, LEFT, RIGHT};
public Board() {
representation = new Piece[BOARD_SIZE][BOARD_SIZE];
movesSinceCapture = 0;
initBoard();
}

public boolean isValidSquare(int i, int j) {
Expand Down Expand Up @@ -62,7 +63,7 @@ public boolean hasAttackVector(Piece p) {
return can_attack;
}

public void initBoard()
private void initBoard()
{
for(int row = 0; row < 3; row++){
for (int col = 0; col < 4; col++)
Expand Down
1 change: 0 additions & 1 deletion src/test/BoardTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public class BoardTest {

public static void main(String[]args) {
Board checkers = new Board();
checkers.initBoard();
checkers.printBoard();
}
}
Expand Down

0 comments on commit 97a12bd

Please sign in to comment.