public ActionResult <Player> Login(string fname)
        {
            Player p1 = _game.GameLogin(fname);

            return(AddPlayer(p1));
            //return await _context.TodoItems.ToListAsync();
        }
Esempio n. 2
0
        public ActionResult <Player> Login(string fname)
        {
            Player p1 = _game.GameLogin(fname);

            ////see if the name is already in  players list
            //Player p1 = players.FirstOrDefault(p => p.Name == fname);

            ////OR create the player instance and save that player
            //if (p1 == null)
            //{
            //	p1 = new Player()
            //	{
            //		Name = fname
            //	};
            //}
            return(AddPlayer(p1));
        }
        public IActionResult Login(string fname)
        {
            Player p1 = _game.GameLogin(fname);

            return(RedirectToAction("AddPlayer", p1));
        }