예제 #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));
        }
예제 #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));
        }
예제 #3
0
 public Task <Player> CreatePlayer([FromBody] NewPlayer player)
 {
     return(processor.CreatePlayer(player));
 }