예제 #1
0
 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.
     }
 }
예제 #2
0
 public GameResult(int turn, int cards, int withRisk, GameOverException cause)
 {
     Turn     = turn;
     Cards    = cards;
     WithRisk = withRisk;
     Cause    = cause;
 }
예제 #3
0
파일: Game.cs 프로젝트: Kirill89/Study
 public void GameIsOver()
 {
     int whoWin = WhoWin ();
     if (whoWin != 0) {
         GameOverException gameOverException = new GameOverException();
         gameOverException.whoWin = whoWin;
         throw gameOverException;
     }
 }
예제 #4
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);
 }
예제 #5
0
 public GameOverArgs(GameOverException e)
 {
     this.e = e;
 }
예제 #6
0
 public GameResult(int turn, int cards, GameOverException cause)
 {
     Turn  = turn;
     Cards = cards;
     Cause = cause;
 }
예제 #7
0
 protected virtual void Side2Depleted(GameState gameState)
 => GameOverException.Lost("Blighted Island-" + Name);