Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="message"></param>
        private void HandleStartGame(StartGame message)
        {
            var message2 = new GameStarted(this.guid);

            this.gameServer.Tell(message2);
            this.Sender.Tell(message2); // send the message straight to the client actor

            if ((this.black != null) && this.black.IsComputer())
            {
                log.Debug("Black is the AI player and will move first.");

                // 'Black' makes the first move in the middle of the board.
                var row    = this.board.Size / 2;
                var column = row;

                MakeMove(row, column, this.tokenSource.Token);
            }
        }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="message"></param>
 private void HandleGameStarted(GameStarted message)
 {
     this.log.Info("Game {0} has started.", message.Guid);
 }