Ejemplo n.º 1
0
        public Task <Player> Create(NewPlayer player)
        {
            Player newPlayer = new Player();

            newPlayer.Name = player.Name;
            // set other values for new player
            newPlayer.Id           = Guid.NewGuid();
            newPlayer.CreationTime = System.DateTime.Now;

            return(_repository.Create(newPlayer));
        }
        public Task <Player> CreatePlayer(NewPlayer player)
        {
            Player newPlayer = new Player();

            newPlayer.Name         = player.Name;
            newPlayer.Id           = Guid.NewGuid();
            newPlayer.CreationTime = System.DateTime.Now;
            newPlayer.Level        = player.Level;
            newPlayer.items        = new List <Item>();
            newPlayer.tag          = player.tag;

            return(_repository.CreatePlayer(newPlayer));
        }
Ejemplo n.º 3
0
 public Task <Player> Create([FromBody] NewPlayer player)
 {
     return(_processor.Create(player));
 }
 public Task <Player> CreatePlayer(NewPlayer player)
 {
     return(_processor.CreatePlayer(player));
 }