Ejemplo n.º 1
0
        public Task <Gameboard> Create(Gameboard board)
        {
            for (int i = 0; i < board.listOfCards.Count; i++)
            {
                nameList.Add(board.listOfCards[i].Name);
                board.listOfCards[i].Name = "?";
            }

            boardcollection.InsertOneAsync(board);
            return(Task.FromResult(board));
        }
Ejemplo n.º 2
0
        public Task <Gameboard> Create(NewGameboard game)
        {
            Gameboard newgame = new Gameboard();


            newgame.Id = Guid.NewGuid();

            Deck deck = new Deck();

            Card[] array = deck.MakeDeck();

            newgame.listOfCards = array.ToList();



            return(_repository.Create(newgame));
        }