Ejemplo n.º 1
0
 // Constructor that takes in a string representing the name of premade deck
 public MasterDeck(string deckType)
 {
     // Fills in the subdecks with their preset cards for the deck deckType
     gameCardDeck   = new GameCardDeck(deckType);
     marketCardDeck = new MarketCardDeck(deckType);
     landTileDeck   = new LandTileDeck(deckType);
 }
Ejemplo n.º 2
0
    public static GameCardDeck GetStandardCardDeck()
    {
        GameCardDeck deck = new GameCardDeck();

        deck.LoadCards(GetStandardCards());

        return(deck);
    }
Ejemplo n.º 3
0
 public void NoteSeriesStart(GameSeriesStarted seriesStarted)
 {
     Deck         = seriesStarted.Plan.Deck;
     _cardIndices = new Dictionary <Card, int>();
     foreach (var(card, index) in Deck.AllCards.Select((c, i) => (c, i)))
     {
         _cardIndices.Add(card, index);
     }
 }
Ejemplo n.º 4
0
        public Task GameSeriesStarted(GameSeriesDto data)
        {
            _deck = new GameCardDeck((Rank)data.MinCardRank);
            var plannedRounds = data.PlannedRounds
                                .Select(setting => new EumelRoundSettings(setting.StartingPlayer, setting.TricksToPlay));
            var plan    = new EumelGamePlan(plannedRounds, _deck);
            var players = data.PlayerInfos.Select(p => new PlayerInfo(p.Name, p.Type)).ToList();
            var e       = new GameSeriesStarted(data.GameId, players, plan);

            _gameSeriesEventCallback(e);
            return(Task.CompletedTask);
        }
Ejemplo n.º 5
0
 public void LoadDeck(GameCardDeck gameCardDeck)
 {
     decks.Add(gameCardDeck);
 }