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

            p.Name         = player.Name;
            p.Id           = Guid.NewGuid();
            p.CreationTime = DateTime.Now;
            return(repo.Create(p));
        }
Ejemplo n.º 2
0
        public Task <Player> CreatePlayer(NewPlayer player)
        {
            Player forward = new Player();

            forward.Name         = player.Name;
            forward.Level        = 1;
            forward.CreationTime = DateTime.Now;
            forward.IsBanned     = false;
            forward.Score        = 0;
            forward.Id           = Guid.NewGuid();
            return(repository.CreatePlayer(forward));
        }
Ejemplo n.º 3
0
 public Task <Player> CreatePlayer([FromBody] NewPlayer player)
 {
     return(processor.CreatePlayer(player));
 }