import javafx.scene.layout.GridPane;
import javafx.scene.layout.RowConstraints;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Font;
public class EightPuzzleViewCtrl {
<BUG>private GridPane gridPane = new GridPane();</BUG>
private Button[] tileBtns = new Button[9];
private EightPuzzleBoard board;
<BUG>public EightPuzzleViewCtrl(StackPane viewRoot) {
viewRoot.getChildren().add(gridPane);
viewRoot.setAlignment(Pos.BOTTOM_CENTER);
gridPane.maxWidthProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(20));</BUG>
gridPane.maxHeightProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(10));

import javafx.scene.layout.GridPane;
import javafx.scene.layout.RowConstraints;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Font;
public class EightPuzzleViewCtrl {
private Button[] tileBtns = new Button[9];
private EightPuzzleBoard board;
public EightPuzzleViewCtrl(StackPane viewRoot) {
GridPane gridPane = new GridPane();
viewRoot.getChildren().add(gridPane);
viewRoot.setAlignment(Pos.CENTER);
gridPane.maxWidthProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(20));
gridPane.maxHeightProperty().bind(Bindings.min(viewRoot.widthProperty(), viewRoot.heightProperty()).subtract(10));
