Exemplo n.º 1
0
        private async Task StartGame(GameBoard board)
        {
            _tramsformer = new ToCanvasTramsformer(objectSize, HeigthSlider.Value, WidthSlider.Value, GamePanel.ActualHeight, GamePanel.ActualWidth);
            ClrearBoard();

            board.OnPieceMove += OnPieceMove;

            CreatePlayers(board.State);

            _engine = new GameEngine(board, (int)Speed.Value);

            await _engine.StartGame();
        }
Exemplo n.º 2
0
 private void GamePanel_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     _tramsformer = new ToCanvasTramsformer(objectSize, HeigthSlider.Value, WidthSlider.Value, e.NewSize.Height, e.NewSize.Width);
 }