Skip to content

Commit

Permalink
Refactored some stuff to shorten the code
Browse files Browse the repository at this point in the history
  • Loading branch information
john committed Apr 21, 2016
1 parent d868467 commit f48a92e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/model/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ public ArrayList<Board> generateMoveFrontier(Color color) {
for (int j = 0; j < BOARD_SIZE; ++j) {
Piece p = this.representation[i][j];
if(null != p && p.getColor() == color) {
ArrayList<Move> jump_moves = generateMoves(this.representation[i][j]);
for (Move move : jump_moves) {
ArrayList<Move> moves = generateMoves(this.representation[i][j]);
for (Move move : moves) {
Board board = new Board(this);
board.move(move);
frontier.add(board);
Expand Down

0 comments on commit f48a92e

Please sign in to comment.