viewRoot.getChildren().add(gridPane);
viewRoot.setAlignment(Pos.BOTTOM_CENTER);
gridPane.maxWidthProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(20));
gridPane.maxHeightProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(10));
}
<BUG>public void updateBoard(NQueensBoard board) {
int size = board.getSize();</BUG>
if (queens.length != size * size) {
gridPane.getChildren().clear();
gridPane.getColumnConstraints().clear();

viewRoot.getChildren().add(gridPane);
viewRoot.setAlignment(Pos.BOTTOM_CENTER);
gridPane.maxWidthProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(20));
gridPane.maxHeightProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(10));
}
public void update(NQueensBoard board) {
int size = board.getSize();
if (queens.length != size * size) {
gridPane.getChildren().clear();
gridPane.getColumnConstraints().clear();
