java - javafx - game not updating changes to scene? -


i making minesweeper clone, trying create new board class when user clicks on mine thereby replacing current board, nothing happens when create new board(). tried search online , closest thing can find how can externally update javafx scene?. don't understand top answer , need guidance on couple things;

  • first (and original question), how replace losing game on board new board? board class line 90
  • second (but relevant), way i'm creating game design wise? don't know if following mvp or if i'm barfing out code , trying make of mess.

here minesweeper clone on github gist.

edit: on user request, added code snippets.

the main start method;

public void start(stage primarystage) {     primarystage.settitle("minesweeper");     control admin = new control();     scene sc = new scene(admin.board);     primarystage.setscene(sc);     primarystage.sizetoscene();     primarystage.setresizable(false);     primarystage.show(); } 

where create new board() in board class;

void display(tile tile) {     string display = string.valueof(tile.surminenum);     if (tile.ismine) {         // here create new board()         admin.board = new board(admin);         display = "m";     }     else if (tile.surminenum < 1)         display = "";     tile.settext(display);     tile.setselected(true); } 


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -