private void OnComputerTurn(ComputerTurnEventArgs sizeEventArgs)
 {
     if (this.ComputerTurn != null)
     {
         this.ComputerTurn(this, sizeEventArgs);
     }
 }
예제 #2
0
 private void ComputerTurn(object sender, ComputerTurnEventArgs e)
 {
     if (this.model.SecondPlayer.IsOnTurn)
     {
         var buttonCoordinates = this.model.ComputerMove();
         var x = buttonCoordinates[0] * e.Size;
         var y = buttonCoordinates[1] * e.Size;
         this.model.PlayerMoved(e.Size, x, y);
         this.view.DisplayComputerTurn(x, y);
     }
 }