Пример #1
0
 void OnMoveMade(ExecuteMoveOperation operation)
 {
     if (this.MoveMade != null)
     {
         MoveMadeEventArgs args = new MoveMadeEventArgs(operation.Player, operation.Move);
         this.MoveMade(this, args);
     }
 }
Пример #2
0
 void OnMoveMade(Player player, Move move)
 {
     if (MoveMade != null)
     {
         MoveMadeEventArgs e = new MoveMadeEventArgs(player, move);
         MoveMade(this, e);
     }
 }
Пример #3
0
        void controller_MoveMade(object sender, MoveMadeEventArgs e)
        {
            string message     = "Player {0} moved from {1} to {2}.";
            string source      = e.Move.Source.ToString();
            string destination = e.Move.Destination.ToString();

            this.infoTextBlock.Text = string.Format(message, e.Player.ToString(), source, destination);

            this.UpdateCurrentPlayerText();
        }
Пример #4
0
        void controller_MoveMade(object sender, MoveMadeEventArgs e)
        {
            MoveHistoryInformation info = new MoveHistoryInformation(e.Player, e.Move);

            this.Add(info);
        }