public void StartGame(IAi aiModule) { _ai = aiModule; //use the aiModule to calculate the computer movements. _model = new Logic(); // nézemodell létrehozása _viewModel = new TicTacToeViewModel(_model); _viewModel.GameEnded += GameEnded; _viewModel.CpuStep += CpuStep; // nézet létrehozása _view = new MainWindow(); _view.DataContext = _viewModel; _view.Show(); Testing test = new Testing(); UnitTesting unitTest = new UnitTesting(); }
public TicTacToeView() { DataContext = new TicTacToeViewModel(this); InitializeComponent(); }
public TicTacToeControl(TicTacToeViewModel vm) { InitializeComponent(); DataContext = _vm = vm; _vm.GameOver += OnGameFinished; }