Exemplo n.º 1
0
 public void AddDirect(FearArgs args)
 {
     EarnedFear += args.count;
     while (PoolMax <= EarnedFear)          // should be while() - need unit test
     {
         EarnedFear -= PoolMax;
         ActivatedCards.Push(Deck.Pop());
         ActivatedCards.Peek().Text = "Active " + ActivatedCards.Count;
     }
     if (Deck.Count == 0)
     {
         GameOverException.Win("Terror Level VICTORY");
     }
     FearAdded?.Invoke(gs, args);
 }
Exemplo n.º 2
0
    public async Task Apply()
    {
        while (ActivatedCards.Count > 0)
        {
            PositionFearCard fearCard = ActivatedCards.Pop();
            // show card to each user
            foreach (var spirit in gs.Spirits)
            {
                await spirit.ShowFearCardToUser("Activating Fear", fearCard, TerrorLevel);
            }

            var ctx = new FearCtx(gs);
            switch (TerrorLevel)
            {
            case 1: await fearCard.FearOptions.Level1(ctx); break;

            case 2: await fearCard.FearOptions.Level2(ctx); break;

            case 3: await fearCard.FearOptions.Level3(ctx); break;
            }
        }
    }