package com.example.testmenu;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TableView;
import javafx.stage.Stage;
public class HelloController {
@FXML
private Button btnAdd;
@FXML
private Button btnClose;
@FXML
private Button btnDel;
@FXML
private Button btnOpen;
@FXML
private TableView<?> tvMain;
@FXML
protected void handleBtnOpenActional() {
}
@FXML
protected void handleBtnAddActional() {
}
@FXML
protected void handleBtnDelActional() {
}
@FXML
private void handleBtnCloseActional(ActionEvent event) {
Stage s = (Stage) btnClose.getScene().getWindow();
s.close();
}
}
private Game CreateNewGame()
{
Game game = new Game();
//Chess.Chess chess = new Chess.Chess();
game.FEN = "e2e4";//chess.fen;
game.Status = "play";
db.Games.Add(game);
db.SaveChanges();
return game;
}
private Game CreateNewGame()
{
Game game = new Game();
Chess.Chess chess = new Chess.Chess();
game.FEN = chess.fen;
game.Status = "play";
db.Games.Add(game);
db.SaveChanges();
return game;
}