Ejemplo n.º 1
0
        public string Create([FromBody] VmAgent vm)
        {
            var    bot     = new AiBot();
            string agentId = String.Empty;

            dc.DbTran(() =>
            {
                var agent    = vm.ToObject <Agent>();
                agent.UserId = CurrentUserId;
                agentId      = bot.CreateAgent(dc, agent);
            });

            return(agentId);
        }
Ejemplo n.º 2
0
 private void StartLevel()
 {
     _map = _levelSetup.Map;
     _map.Reset();
     _aiBot          = new AiBot(_map);
     _exitGhostHouse = _levelSetup.ExitGhostHouse;
     ResetGhostsAndPacMan();
     _gameDraw.DrawMap(_map, false);
     _pillCount = 0;
     _powerPillAnimation.Reset();
     _scoreAnimation.Reset();
     _bonusFruit.SetLevel(_level);
     _ghostHouse.SetLevel(_level, Ghosts);
     _random = new Random();
 }