Skip to content

Commit

Permalink
house keeping
Browse files Browse the repository at this point in the history
  • Loading branch information
pfichtner committed Nov 7, 2023
1 parent e3dd8de commit e1f9f35
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/main/java/org/ase/fourwins/board/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import static java.util.Collections.emptyList;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
import static java.util.stream.IntStream.range;
import static java.util.stream.Stream.concat;
import static java.util.stream.Stream.generate;
import static java.util.stream.Stream.iterate;
import static org.ase.fourwins.board.Board.Direction.EAST;
import static org.ase.fourwins.board.Board.Direction.NORTH;
Expand Down Expand Up @@ -216,8 +216,7 @@ public boolean isFull() {

private PlayableBoard(BoardInfo boardInfo) {
this.boardInfo = boardInfo;
int rowCount = boardInfo.getRows();
this.columns = range(0, boardInfo.getColumns()).mapToObj(__ -> rowCount).map(Column::new)
this.columns = generate(() -> new Column(boardInfo.getRows())).limit(boardInfo.getColumns())
.toArray(Column[]::new);
}

Expand Down

0 comments on commit e1f9f35

Please sign in to comment.