public GUI(gameInterfaceFunc start, gameInterfaceFunc pause, gameInterfaceFunc reset, gameInterfaceFunc save, gameInterfaceFunc load) { InitializeComponent(); // Delegate functions from Game, called when different buttons are pressed. startGameFunc = start; pauseGameFunc = pause; resetGameFunc = reset; saveGameFunc = save; loadGameFunc = load; // Custom control for drawing the chess board // Use a lambda expression that allows access to selectedMove. drawControl = new DrawControl(() => { return(selectedMove); }); }
public GUI(gameInterfaceFunc start, gameInterfaceFunc pause, gameInterfaceFunc reset, gameInterfaceFunc save, gameInterfaceFunc load) { InitializeComponent(); // Delegate functions from Game, called when different buttons are pressed. startGameFunc = start; pauseGameFunc = pause; resetGameFunc = reset; saveGameFunc = save; loadGameFunc = load; // Custom control for drawing the chess board // Use a lambda expression that allows access to selectedMove. drawControl = new DrawControl( () => { return selectedMove; }); }