Skip to content

Commit

Permalink
making changes
Browse files Browse the repository at this point in the history
  • Loading branch information
john committed Apr 20, 2016
1 parent 8e062a8 commit da362d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/model/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,22 @@ public class Board {
// Move properties
private int movesSinceCapture;
public enum Direction {UP, DOWN, LEFT, RIGHT};


public Board() {
representation = new Piece[BOARD_SIZE][BOARD_SIZE];
movesSinceCapture = 0;
init();
}


/**
* Initialize the board putting checker pieces in their starting locations
*/
private void init()
{
for(int row = 0; row < 3; row++){
for (int col = 0; col < 4; col++)
{
for(int row = 0; row < 3; row++) {
for (int col = 0; col < 4; col++) {
Piece red_piece = new Piece(Color.RED, 2*col + (row % 2), row);
Piece black_piece = new Piece(Color.BLACK, 2*col + (BOARD_SIZE - 1 - row) %2, BOARD_SIZE - 1 - row);
representation[row][2*col+ (row % 2)] = red_piece;
Expand Down

0 comments on commit da362d9

Please sign in to comment.