Im trying to clear simple canvas in JavaFX.
Start function
Canvas canvas = new Canvas();
Group root = new Group(canvas);
Scene scene = new Scene(root, 1400, 1000);
If user want to load game, then loadSave boolean variable sets to 'true'
if(loadSave){
//Clear scene and load new with circles from file
}
Else, it loads new game
else if(!loadSave){
drawSquares(scene, root);
}
I'll really appreciate your help.