Esempio n. 1
0
        public ActionResult Index(Pacman.Simulator.Pacman item, string pacmanAction)
        {
            switch (pacmanAction)
            {
            case "PLACE":
            {
                item = _service.Place(item.X, item.Y, item.direction);
                break;
            }

            case "MOVE":
            {
                item = _service.MovePacMan(item);
                break;
            }

            case "LEFT":
            {
                item = _service.PositionPacMan(item, Position.LEFT);
                break;
            }

            case "RIGHT":
            {
                item = _service.PositionPacMan(item, Position.RIGHT);
                break;
            }

            default:
                break;
            }
            ModelState.Clear();

            return(View("/Views/Home/Index.cshtml", item));
        }
Esempio n. 2
0
 public virtual Pacman Report(Pacman item)
 {
     return(item);
 }