Esempio 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));
        }
Esempio 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));
        }