I'm making Tetris in JavaFX and set up a the gameboard of 200 Panes set up in a 10x20 grid.
I have added all of those objects to my controller. However, I would like to set all of them up in an array so that it is easier to handle the coordinates.
Pane[][] does not seem to be allowed, giving the error in Eclipse "Type mismatch: cannot convert from Pane to Pane[]" for some of the listed Pane object and "pane01 cannot be resolved to a type" for others.
Can Pane objects simply not be put into an array? I could have sworn I was able to with ToggleButtons in a previous project, but I can't remember for sure.
Thanks ahead.
I set up the Panes in the controller similar to:
@FXML
private Pane pane00, pane10, pane20,
pane01, pane11, pane21;
with the numbers representing the x/y coordinates. And was trying to put them into an array as:
public Pane[][] gameBoard = {pane00, pane10, pane20},
{pane01, pane11, pane21};
I originally tried doing the above array setup just under the @FXML as the main setup of it in the controller, but it had the "pane01 cannot be resolved to a type" error on some of the objects (note: only SOME, others were fine for whatever reason)