void CheckIfSpiritIsDestroyed() { if (Placed.Count == 0 && stasis.Count == 0) { GameOverException.Lost("Spirit is Destroyed"); // !! if we had access to the Spirit here, we could say who it was. } }
public GameResult(int turn, int cards, int withRisk, GameOverException cause) { Turn = turn; Cards = cards; WithRisk = withRisk; Cause = cause; }
public void GameIsOver() { int whoWin = WhoWin (); if (whoWin != 0) { GameOverException gameOverException = new GameOverException(); gameOverException.whoWin = whoWin; throw gameOverException; } }
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); }
public GameOverArgs(GameOverException e) { this.e = e; }
public GameResult(int turn, int cards, GameOverException cause) { Turn = turn; Cards = cards; Cause = cause; }
protected virtual void Side2Depleted(GameState gameState) => GameOverException.Lost("Blighted Island-" + Name);