예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="message"></param>
        private void HandleMakeMove(MakeMove message)
        {
            this.log.Debug("MakeMove - game={0}, player={1}, row={2}, column={3}",
                           message.Guid, message.Player, message.Row, message.Column);

            GameContext actors;

            this.games.TryGetValue(message.Guid, out actors);
            if (actors != null)
            {
                actors.GameActorRef.Tell(message, Sender);
            }
        }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="message"></param>
 private void HandleMakeMove(MakeMove message)
 {
     if (message.Player.IsHuman())
     {
         // handles the human player move
         PlayerMoved(message.Row, message.Column, message.Player);
     }
     else
     {
         // handles the computer player move
         MakeMove(message.Row, message.Column, this.tokenSource.Token);
         BrainMoved(message.Row, message.Column, message.Player);
     }
 }