예제 #1
0
        private void Execute(ICollection <Move> moves)
        {
            _logger.Info($"Execute {string.Join(", ", moves)}");

            Agent.Executor.Hit(moves.Select(x => x.ToButton()));

            var gameStateSimulation = new GameState(Agent.GameState);

            foreach (var move in moves)
            {
                if (move == Move.Drop)
                {
                    throw new Exception("Drop not allowed here");
                }

                _tracedPiece.Apply(move);
                move.Apply(gameStateSimulation);
            }

            UpdateCurrentPiece(_tracedPiece);
        }